import * as pulumi from "@pulumi/cloud" ; let countDown = new pulumi . Topic < number > ( "examples-countDown" ) ; countDown . subscribe ( "watcher" , async ( num ) => { console . log ( num ) ; if ( num > 0 ) { await countDown . publish ( num - 1 ) ; } } ) ; pulumi . timer . interval ( "examples-heartbeat" , { minutes : 3 } , async ( ) => { await countDown . publish ( 25 ) ; } ) ;