mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 13:45:34 -05:00
not escape unicode char for import path string. (#39463)
* not escape unicode char for import path string. * fix test.
This commit is contained in:
@@ -4139,7 +4139,8 @@ namespace ts {
|
||||
|
||||
function symbolToStringWorker(writer: EmitTextWriter) {
|
||||
const entity = builder(symbol, meaning!, enclosingDeclaration, nodeFlags)!; // TODO: GH#18217
|
||||
const printer = createPrinter({ removeComments: true });
|
||||
// add neverAsciiEscape for GH#39027
|
||||
const printer = enclosingDeclaration?.kind === SyntaxKind.SourceFile ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true });
|
||||
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
||||
printer.writeNode(EmitHint.Unspecified, entity, /*sourceFile*/ sourceFile, writer);
|
||||
return writer;
|
||||
|
||||
Reference in New Issue
Block a user