File tree 2 files changed +29
-4
lines changed 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 {
31683
31683
if (file) {
31684
31684
if (compilerOptions.checkJs === undefined && file.checkJsDirective === undefined && (file.scriptKind === ScriptKind.JS || file.scriptKind === ScriptKind.JSX)) {
31685
31685
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);
31687
31690
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 );
31690
31693
}
31691
31694
}
31692
31695
return false;
Original file line number Diff line number Diff line change 23
23
//// const person = new Person();
24
24
//// person.[|getFavoriteColour|]();
25
25
//// 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|]
26
37
verify . codeFixAll ( {
27
38
fixId : "fixSpelling" ,
28
39
fixAllDescription : "Fix all detected spelling errors" ,
@@ -48,5 +59,16 @@ class Person {
48
59
49
60
const person = new Person();
50
61
person.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` ,
52
74
} ) ;
You can’t perform that action at this time.
0 commit comments