wait

Function
import { wait } from '@esri/hub-common';

await wait(1000); // waits for 1 second before continuing


A generic utility function for delaying an action by a provided timeout
import { wait } from '@esri/hub-common';

await wait(1000); // waits for 1 second before continuing


A generic utility function for delaying an action by a provided timeout
  • wait(delay: number) : Promise<Object>

Parameters

Parameter Type Default Notes
delay Required number

Time to wait in milliseconds

Returns

An empty promise that needs to be awaited

Promise<Object>

Function defined in common/src/utils/wait.ts:12