declare const node: ts.Node;
declare const type: ts.Type;
declare const typeChecker: ts.TypeChecker;
if (isThenableType(typeChecker, node, type)) {
// ...
}
Determines whether a type is thenable and thus can be used with await
.
Optional
type: Typedeclare const expression: ts.Expression;
declare const typeChecker: ts.TypeChecker;
if (isThenableType(typeChecker, expression)) {
// ...
}
declare const expression: ts.Expression;
declare const typeChecker: ts.TypeChecker;
declare const type: ts.Type;
if (isThenableType(typeChecker, expression, type)) {
// ...
}
Determines whether a type is thenable and thus can be used with
await
.