File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -31683,10 +31683,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
3168331683 if (file) {
3168431684 if (compilerOptions.checkJs === undefined && file.checkJsDirective === undefined && (file.scriptKind === ScriptKind.JS || file.scriptKind === ScriptKind.JSX)) {
3168531685 const declarationFile = forEach(suggestion?.declarations, getSourceFileOfNode);
31686- const suggestionHasNoExtends = !suggestion?.valueDeclaration || !isClassLike(suggestion.valueDeclaration) || suggestion.valueDeclaration.heritageClauses?.length
31686+ const suggestionHasNoExtendsOrDecorators = !suggestion?.valueDeclaration
31687+ || !isClassLike(suggestion.valueDeclaration)
31688+ || suggestion.valueDeclaration.heritageClauses?.length
31689+ || classOrConstructorParameterIsDecorated(/*useLegacyDecorators*/ false, suggestion.valueDeclaration);
3168731690 return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile))
31688- && !(excludeClasses && suggestion && suggestion.flags & SymbolFlags.Class && suggestionHasNoExtends )
31689- && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === SyntaxKind.ThisKeyword && suggestionHasNoExtends );
31691+ && !(excludeClasses && suggestion && suggestion.flags & SymbolFlags.Class && suggestionHasNoExtendsOrDecorators )
31692+ && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === SyntaxKind.ThisKeyword && suggestionHasNoExtendsOrDecorators );
3169031693 }
3169131694 }
3169231695 return false;
Original file line number Diff line number Diff line change 2323//// const person = new Person();
2424//// person.[|getFavoriteColour|]();
2525//// person.[|getFavoriteColoxr|]();
26+ //// function deco() { }
27+ //// @deco
28+ //// class Art {
29+ //// style = true
30+ //// }
31+ //// const a = new Art()
32+ //// a.[|stylo|]
33+ //// @deco
34+ //// class Double extends Art { }
35+ //// const db = new Double()
36+ //// db.[|stylo|]
2637verify . codeFixAll ( {
2738 fixId : "fixSpelling" ,
2839 fixAllDescription : "Fix all detected spelling errors" ,
@@ -48,5 +59,16 @@ class Person {
4859
4960const person = new Person();
5061person.getFavoriteColor();
51- person.getFavoriteColor();` ,
62+ person.getFavoriteColor();
63+ function deco() { }
64+ @deco
65+ class Art {
66+ style = true
67+ }
68+ const a = new Art()
69+ a.stylo
70+ @deco
71+ class Double extends Art { }
72+ const db = new Double()
73+ db.stylo` ,
5274} ) ;
You can’t perform that action at this time.
0 commit comments