Skip to content

Commit 0232440

Browse files
committed
add jsdocs
1 parent 904a6e1 commit 0232440

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/compiler/types.ts

+10
Original file line numberDiff line numberDiff line change
@@ -4968,6 +4968,16 @@ export interface TypeChecker {
49684968
getWidenedLiteralType(type: Type): Type;
49694969
/** @internal */
49704970
getPromisedTypeOfPromise(promise: Type, errorNode?: Node): Type | undefined;
4971+
/**
4972+
* Gets the "awaited type" of a type.
4973+
*
4974+
* The "awaited type" of an expression is its "promised type" if the expression is a
4975+
* Promise-like type; otherwise, it is the type of the expression. If the "promised
4976+
* type" is itself a Promise-like, the "promised type" is recursively unwrapped until a
4977+
* non-promise type is found.
4978+
*
4979+
* This is used to reflect the runtime behavior of the `await` keyword.
4980+
*/
49714981
getAwaitedType(type: Type): Type | undefined;
49724982
/** @internal */
49734983
isEmptyAnonymousObjectType(type: Type): boolean;

0 commit comments

Comments
 (0)