typescript new timeout object code example Example: timeout typescript setTimeout(() => { console.log('hi'); }, 500);