9.0 Released! → Native ESM runtimes 🚀, Vite support ⚡️, multi-window apps and more...
Read Announcement
ts
function setTimeout(
   callback: Function, 
   milliseconds?: number, ...
   args: any[]): number;

Defined in: timer/index.d.ts:7

Calls a function after a specified delay.

Parameters

ParameterTypeDescription
callbackFunctionThe function to be called.
milliseconds?numberThe time to wait before the function is called. Defaults to 0.
...args?any[]One or more parameter to use once the function is called. Defaults to no parameters.

Returns

number

Previous
setInterval