File tree 2 files changed +20
-0
lines changed
tests/baselines/reference/api
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4968,6 +4968,16 @@ export interface TypeChecker {
4968
4968
getWidenedLiteralType ( type : Type ) : Type ;
4969
4969
/** @internal */
4970
4970
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
+ */
4971
4981
getAwaitedType ( type : Type ) : Type | undefined ;
4972
4982
/** @internal */
4973
4983
isEmptyAnonymousObjectType ( type : Type ) : boolean ;
Original file line number Diff line number Diff line change @@ -6070,6 +6070,16 @@ declare namespace ts {
6070
6070
getBaseTypes(type: InterfaceType): BaseType[];
6071
6071
getBaseTypeOfLiteralType(type: Type): Type;
6072
6072
getWidenedType(type: Type): Type;
6073
+ /**
6074
+ * Gets the "awaited type" of a type.
6075
+ *
6076
+ * The "awaited type" of an expression is its "promised type" if the expression is a
6077
+ * Promise-like type; otherwise, it is the type of the expression. If the "promised
6078
+ * type" is itself a Promise-like, the "promised type" is recursively unwrapped until a
6079
+ * non-promise type is found.
6080
+ *
6081
+ * This is used to reflect the runtime behavior of the `await` keyword.
6082
+ */
6073
6083
getAwaitedType(type: Type): Type | undefined;
6074
6084
getReturnTypeOfSignature(signature: Signature): Type;
6075
6085
getNullableType(type: Type, flags: TypeFlags): Type;
You can’t perform that action at this time.
0 commit comments