mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-23 07:07:09 -05:00
Bailout early from isFunctionObjectType for evolving arrays (#58049)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
74cefa848c
commit
1da9630a34
@@ -27381,6 +27381,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
function isFunctionObjectType(type: ObjectType): boolean {
|
||||
if (getObjectFlags(type) & ObjectFlags.EvolvingArray) {
|
||||
return false;
|
||||
}
|
||||
// We do a quick check for a "bind" property before performing the more expensive subtype
|
||||
// check. This gives us a quicker out in the common case where an object type is not a function.
|
||||
const resolved = resolveStructuredTypeMembers(type);
|
||||
|
||||
Reference in New Issue
Block a user