fix(58146): enum quick info can display non ascii strings (#58171)

This commit is contained in:
idango10
2024-04-12 23:04:03 +03:00
committed by GitHub
parent a9b0d1ee53
commit a4d12a46c8
2 changed files with 14 additions and 1 deletions

View File

@@ -1762,7 +1762,7 @@ function canUseOriginalText(node: LiteralLikeNode, flags: GetLiteralTextFlags):
/** @internal */
export function getTextOfConstantValue(value: string | number) {
return isString(value) ? '"' + escapeNonAsciiString(value) + '"' : "" + value;
return isString(value) ? `"${escapeString(value)}"` : "" + value;
}
// Make an identifier from an external module name by extracting the string after the last "/" and replacing