typeof x === "function" type guards include Function interface
This commit is contained in:
parent
9defdde02f
commit
d28a4feeba
1 changed files with 1 additions and 1 deletions
|
@ -7366,7 +7366,7 @@ namespace ts {
|
|||
}
|
||||
if (flags & TypeFlags.ObjectType) {
|
||||
const resolved = resolveStructuredTypeMembers(type);
|
||||
return resolved.callSignatures.length || resolved.constructSignatures.length ?
|
||||
return resolved.callSignatures.length || resolved.constructSignatures.length || isTypeSubtypeOf(type, globalFunctionType) ?
|
||||
strictNullChecks ? TypeFacts.FunctionStrictFacts : TypeFacts.FunctionFacts :
|
||||
strictNullChecks ? TypeFacts.ObjectStrictFacts : TypeFacts.ObjectFacts;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue