File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7529,9 +7529,11 @@ namespace ts {
75297529 }
75307530
75317531 function isAutoTypedProperty(symbol: Symbol) {
7532- // A property is auto-typed in noImplicitAny mode when its declaration has no type annotation or initializer.
7532+ // A property is auto-typed when its declaration has no type annotation or initializer and we're in
7533+ // noImplicitAny mode or a .js file.
75337534 const declaration = symbol.valueDeclaration;
7534- return noImplicitAny && declaration && isPropertyDeclaration(declaration) && !declaration.type && !declaration.initializer;
7535+ return declaration && isPropertyDeclaration(declaration) && !getEffectiveTypeAnnotationNode(declaration) &&
7536+ !declaration.initializer && (noImplicitAny || isInJSFile(declaration));
75357537 }
75367538
75377539 function getDeclaringConstructor(symbol: Symbol) {
You can’t perform that action at this time.
0 commit comments