Skip to content

Interface: Utils ​

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

Native Utils object (its methods are mixed into DesktopEngine)

Extended by ​

Methods ​

applyNew() ​

ts
applyNew<T>(constructor, args): T;

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

Calls a constructor with an argument array: new ctor(...args); returns null unless there are exactly 2 arguments, throws a TypeError if constructor isn't one or args isn't an object

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
constructor(...args) => T
argsArrayLike<any>

Returns ​

T


base64Decode() ​

ts
base64Decode(base64): ArrayBuffer | null;

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

Decodes a Base64 string into an ArrayBuffer; returns null on failure or if empty

Parameters ​

ParameterType
base64string

Returns ​

ArrayBuffer | null


base64Encode() ​

ts
base64Encode(buffer): string | null;

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

Encodes an ArrayBuffer (TypedArrays aren't supported) as Base64; returns null on failure

Parameters ​

ParameterType
bufferArrayBuffer

Returns ​

string | null


clearInterval() ​

ts
clearInterval(id): void;

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

Cancels a setInterval

Parameters ​

ParameterType
idnumber | null | undefined

Returns ​

void


clearTimeout() ​

ts
clearTimeout(id): void;

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

Cancels a setTimeout

Parameters ​

ParameterType
idnumber | null | undefined

Returns ​

void


setInterval() ​

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

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

Runs a callback repeatedly, see the global setInterval

Type Parameters ​

Type Parameter
A extends any[]

Parameters ​

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

Returns ​

number


setTimeout() ​

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

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

Runs a callback after a delay, see the global setTimeout

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