DefinitelyTyped/types/promise.prototype.finally/index.d.ts
2019-02-12 14:36:28 -08:00

19 lines
644 B
TypeScript

// Type definitions for promise.prototype.finally 2.0
// Project: https://github.com/es-shims/promise.prototype.finally
// Definitions by: Slava Shpitalny <https://github.com/slavik57>
// BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare global {
interface Promise<T> {
finally<U>(onFinally?: () => U | PromiseLike<U>): Promise<T>;
}
}
export = promiseFinally;
declare function promiseFinally<T, U>(promise: Promise<T>, onFinally?: () => U | PromiseLike<U>): Promise<T>;
declare namespace promiseFinally {
function shim(): void;
}