Skip to content

Function: setTimeout() ​

ts
function setTimeout<A>(
   callback, 
   delay?, 
   ...args
): number;

Defined in: types/desktop-engine.d.ts:4966

Runs a callback after a delay in milliseconds, 0 by default, with the arguments after the delay. The delay is converted to a number, and NaN, a negative one, Infinity or one over 2^31 - 1 is 0. Returns the id for clearTimeout, which is never 0; a callback that isn't a function (a string of code, say) isn't run, and the result is null.

Type Parameters ​

Type Parameter
A extends any[]

Parameters ​

ParameterType
callback(...args) => void
delay?number
...args?A

Returns ​

number

The SDK is released under the Apache License 2.0