Skip to content

Commit 98a146d

Browse files
author
Gabriela Araujo Britto
committed
use getTouchingToken
1 parent cd060e7 commit 98a146d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/refactors/convertToNamedParameters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ namespace ts.refactor.convertToNamedParameters {
233233
}
234234

235235
function getFunctionDeclarationAtPosition(file: SourceFile, startPosition: number, checker: TypeChecker): ValidFunctionDeclaration | undefined {
236-
const node = getTokenAtPosition(file, startPosition);
236+
const node = getTouchingToken(file, startPosition);
237237
const functionDeclaration = getContainingFunction(node);
238238
if (functionDeclaration
239239
&& isValidFunctionDeclaration(functionDeclaration, checker)

0 commit comments

Comments
 (0)