/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0. See LICENSE file in the project root for details. ***************************************************************************** */ import { CancellationToken } from "./cancellation"; import { Cancelable } from "@esfx/cancelable"; /** * Waits the specified number of milliseconds before resolving. * * @param msec The number of milliseconds to wait before resolving. */ export declare function delay(msec: number): Promise; /** * Waits the specified number of milliseconds before resolving with the provided value. * * @param msec The number of milliseconds to wait before resolving. * @param value An optional value for the resulting Promise. */ export declare function delay(msec: number, value: T | PromiseLike): Promise; /** * Waits the specified number of milliseconds before resolving. * * @param token A CancellationToken * @param msec The number of milliseconds to wait before resolving. */ export declare function delay(token: CancellationToken | Cancelable, msec: number): Promise; /** * Waits the specified number of milliseconds before resolving with the provided value. * * @param token A CancellationToken * @param msec The number of milliseconds to wait before resolving. * @param value An optional value for the resulting Promise. */ export declare function delay(token: CancellationToken | Cancelable, msec: number, value: T | PromiseLike): Promise;