Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 694efba

Browse filesBrowse files
author
Andy Hanson
committed
Fix use of getTokenAtPosition to use updated signature
1 parent 24d98f2 commit 694efba
Copy full SHA for 694efba

1 file changed

+2-2Lines changed: 2 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/services/refactors/convertFunctionToEs6Class.ts‎

Copy file name to clipboardExpand all lines: src/services/refactors/convertFunctionToEs6Class.ts
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.