From d74b7764e886a3dac1e3348e2975eb6225cdd30e Mon Sep 17 00:00:00 2001 From: Isabel Duan Date: Fri, 19 Jul 2024 09:50:43 -0700 Subject: [PATCH] fix comments --- src/compiler/checker.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 59bd26847af..903e2aac0fe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22299,6 +22299,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const containerDecl = source.symbol.valueDeclaration; if (containerDecl === undefined) return false; + // we accept extra EPC cases when #59277 const isValidParent = (n: Node) => { return hasOnlyExpressionInitializer(n) || isSatisfiesExpression(n) || isReturnStatement(n); }; @@ -22375,8 +22376,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function shouldCheckAsExcessProperty(prop: Symbol) { if (prop.valueDeclaration?.parent === containerDecl) return true; if (!checkSpread) return false; - // if (prop.valueDeclaration) return isPropFromInlineSpread(prop.valueDeclaration); - // check if the property is in a spread inline object top level. This will be optimized as it's probably doing a lot of extra work with big/very nested objects if (prop.declarations) return prop.declarations.some(isPropFromInlineSpread); return false;