diff --git a/src/lib/es2018.promise.d.ts b/src/lib/es2018.promise.d.ts index 070c4972f11..49171882e66 100644 --- a/src/lib/es2018.promise.d.ts +++ b/src/lib/es2018.promise.d.ts @@ -8,5 +8,5 @@ interface Promise { * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ - finally(onfinally?: (() => void) | undefined | null): Promise; + finally(deferred onfinally?: (() => void) | undefined | null): Promise; } diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 33bbb991474..0ed54745a74 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1516,7 +1516,7 @@ interface PromiseLike { * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; + then(deferred onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, deferred onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** @@ -1529,14 +1529,14 @@ interface Promise { * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; + then(deferred onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, deferred onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; + catch(deferred onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } /**