diff --git a/types/promise.prototype.finally/index.d.ts b/types/promise.prototype.finally/index.d.ts index 9df993ce93..cc50669344 100644 --- a/types/promise.prototype.finally/index.d.ts +++ b/types/promise.prototype.finally/index.d.ts @@ -5,7 +5,7 @@ declare global { interface Promise { - finally(onFinally?: () => U | Promise): Promise; + finally(onFinally?: () => U | PromiseLike): Promise; } } diff --git a/types/promise.prototype.finally/promise.prototype.finally-tests.ts b/types/promise.prototype.finally/promise.prototype.finally-tests.ts index b7f5848606..b28a64b10d 100644 --- a/types/promise.prototype.finally/promise.prototype.finally-tests.ts +++ b/types/promise.prototype.finally/promise.prototype.finally-tests.ts @@ -7,6 +7,7 @@ var promise = new Promise((resolve, reject) => { }); promise.finally(() => {}); +promise.finally(() => >Promise.resolve()); promise.then(() => {}, () => {}).finally(() => {}); promise.catch(() => {}).finally(() => {});