Skip to content

Commit 6a48508

Browse files
committed
Use effective 'override' modifier in fixSpelling codefix
1 parent 428d327 commit 6a48508

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/services/codefixes/fixSpelling.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
getModeForUsageLocation,
1111
getTextOfNode,
1212
getTokenAtPosition,
13-
hasSyntacticModifier,
13+
hasOverrideModifier,
1414
ImportDeclaration,
1515
isBinaryExpression,
1616
isClassElement,
@@ -27,7 +27,6 @@ import {
2727
isPropertyAccessExpression,
2828
isQualifiedName,
2929
isStringLiteralLike,
30-
ModifierFlags,
3130
Node,
3231
NodeFlags,
3332
ScriptTarget,
@@ -131,7 +130,7 @@ function getInfo(sourceFile: SourceFile, pos: number, context: CodeFixContextBas
131130
const props = checker.getContextualTypeForArgumentAtIndex(tag, 0);
132131
suggestedSymbol = checker.getSuggestedSymbolForNonexistentJSXAttribute(node, props!);
133132
}
134-
else if (hasSyntacticModifier(parent, ModifierFlags.Override) && isClassElement(parent) && parent.name === node) {
133+
else if (hasOverrideModifier(parent) && isClassElement(parent) && parent.name === node) {
135134
const baseDeclaration = findAncestor(node, isClassLike);
136135
const baseTypeNode = baseDeclaration ? getEffectiveBaseTypeNode(baseDeclaration) : undefined;
137136
const baseType = baseTypeNode ? checker.getTypeAtLocation(baseTypeNode) : undefined;

0 commit comments

Comments
 (0)