import { continueAsNew , sleep } from '@temporalio/workflow' ; export async function loopingWorkflow ( iteration = 0 ) { if ( iteration === 10 ) { return ; } console . log ( 'Running Workflow iteration:' , iteration ) ; await sleep ( 1000 ) ; await continueAsNew < typeof loopingWorkflow > ( iteration + 1 ) ; }