You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/lib.es5.d.ts
+2-2
Original file line number
Diff line number
Diff line change
@@ -1532,8 +1532,8 @@ interface Promise<T> {
1532
1532
*/
1533
1533
typeAwaited<T>=
1534
1534
Textendsnull|undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
1535
-
Textendsobject&{then(onfulfilled: infer F, ...args: infer _): any} ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1536
-
Fextends((value: infer V, ...args: infer _)=>any) ? // if the argument to `then` is callable, extracts the first argument
1535
+
Textendsobject&{then(onfulfilled: infer F): any} ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
1536
+
Fextends((value: infer V, ...args: any)=>any) ? // if the argument to `then` is callable, extracts the first argument
1537
1537
Awaited<V> : // recursively unwrap the value
1538
1538
never : // the argument to `then` was not callable
0 commit comments