@types/promise.prototype.finally
Version:
TypeScript definitions for promise.prototype.finally
32 lines (24 loc) • 1.1 kB
Markdown
> `npm install --save @types/promise.prototype.finally`
This package contains type definitions for promise.prototype.finally (https://github.com/es-shims/promise.prototype.finally).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promise.prototype.finally.
````ts
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;
}
````
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
* Dependencies: none
These definitions were written by [Slava Shpitalny](https://github.com/slavik57), [BendingBender](https://github.com/BendingBender), and [Jordan Harband](https://github.com/ljharb).