Skip to content

Commit aaeb565

Browse files
author
Andy
authored
Merge pull request #15993 from Microsoft/getTokenAtPosition
Fix use of getTokenAtPosition to use updated signature
2 parents 24d98f2 + 694efba commit aaeb565

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/refactors/convertFunctionToEs6Class.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace ts.refactor {
1212

1313
function isApplicable(context: RefactorContext): boolean {
1414
const start = context.startPosition;
15-
const node = getTokenAtPosition(context.file, start);
15+
const node = getTokenAtPosition(context.file, start, /*includeJsDocComment*/ false);
1616
const checker = context.program.getTypeChecker();
1717
let symbol = checker.getSymbolAtLocation(node);
1818

@@ -27,7 +27,7 @@ namespace ts.refactor {
2727
const start = context.startPosition;
2828
const sourceFile = context.file;
2929
const checker = context.program.getTypeChecker();
30-
const token = getTokenAtPosition(sourceFile, start);
30+
const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false);
3131
const ctorSymbol = checker.getSymbolAtLocation(token);
3232
const newLine = context.rulesProvider.getFormatOptions().newLineCharacter;
3333

0 commit comments

Comments
 (0)