Fix unbound host.getNewLine

This commit is contained in:
Andrew Branch
2021-10-20 12:22:37 -07:00
committed by GitHub
parent e76c18da3c
commit 35c1ea384f

View File

@@ -841,7 +841,7 @@ namespace ts.Completions {
target: options.target,
omitTrailingSemicolon: true,
hasSnippet: true,
newLine: getNewLineKind(getNewLineCharacter(options, host.getNewLine)),
newLine: getNewLineKind(getNewLineCharacter(options, maybeBind(host, host.getNewLine))),
});
const importAdder = codefix.createImportAdder(sourceFile, program, preferences, host);