function setTimeout

Sets a timer which executes a function once after the timer expires. Returns an id which may be used to cancel the timeout.

setTimeout(() => { console.log('hello'); }, 500);

Parameters

cb: (...args: any[]) => void[src]
optional
delay: number
[src]
...args: any[][src]