mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-19 12:45:58 -05:00
Switch lib.d.ts to use /** @deferred */
This commit is contained in:
2
src/lib/es2018.promise.d.ts
vendored
2
src/lib/es2018.promise.d.ts
vendored
@@ -8,5 +8,5 @@ interface Promise<T> {
|
||||
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
finally(deferred onfinally?: (() => void) | undefined | null): Promise<T>;
|
||||
finally(/** @deferred */ onfinally?: (() => void) | undefined | null): Promise<T>;
|
||||
}
|
||||
|
||||
6
src/lib/es5.d.ts
vendored
6
src/lib/es5.d.ts
vendored
@@ -1516,7 +1516,7 @@ interface PromiseLike<T> {
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1 = T, TResult2 = never>(deferred onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, deferred onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
||||
then<TResult1 = T, TResult2 = never>(/** @deferred */ onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, /** @deferred */ onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1529,14 +1529,14 @@ interface Promise<T> {
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1 = T, TResult2 = never>(deferred onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, deferred onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
||||
then<TResult1 = T, TResult2 = never>(/** @deferred */ onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, /** @deferred */ onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
* 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<TResult = never>(deferred onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
||||
catch<TResult = never>(/** @deferred */ onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user