mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
Only used cached undefined contextual type for requests with no flags (#52224)
This commit is contained in:
@@ -28842,7 +28842,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
const index = findContextualNode(node);
|
||||
if (index >= 0) {
|
||||
return contextualTypes[index];
|
||||
const cached = contextualTypes[index];
|
||||
if (cached || !contextFlags) return cached;
|
||||
}
|
||||
const { parent } = node;
|
||||
switch (parent.kind) {
|
||||
|
||||
Reference in New Issue
Block a user