useNonAdjustedEndPosition when replacing import node (#22517)

* useNonAdjustedEndPosition when replacing import node

* Never adjust positions, and add trivia test
This commit is contained in:
Andy
2018-03-14 11:46:45 -07:00
committed by GitHub
parent 6efc679b9e
commit e7ce3f9457
3 changed files with 7 additions and 6 deletions

View File

@@ -38,6 +38,6 @@ namespace ts.codefix {
}
function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, info: Info): void {
changes.replaceNode(sourceFile, info.importNode, makeImportDeclaration(info.name, /*namedImports*/ undefined, info.moduleSpecifier));
changes.replaceNode(sourceFile, info.importNode, makeImportDeclaration(info.name, /*namedImports*/ undefined, info.moduleSpecifier), textChanges.useNonAdjustedPositions);
}
}