🔎 Search Terms
"Hexadecimal digit expected."
"Hexadecimal digit expected TypeScript 5.0.4"
"tagged template Hexadecimal digit expected"
"f is declared but its value is never read tagged template"
"Interrupted CRLF \x0D \x0A TypeScript"
site:github.com/microsoft/TypeScript "Hexadecimal digit expected"
🕗 Version & Regression Information
This changed between versions 5.0.4 and the next release (the error is present in 5.0.4 and earlier, and absent in versions after 5.0.4 based on my testing).
⏯ Playground Link
https://www.typescriptlang.org/zh/play/?target=2&ts=5.0.4#code/GYVwdgxgLglg9mABMRAKRA6LzEC5ECGYAnogNqIC6iAlIgN4BQAvoygAaIA6AHogAyIAIogAk9RACIAkmCgBTAE6KQABwUATRAGEASgBkAYpMTNufQQEFEnANyMgA
💻 Code
function f ( ... f : any [ ] ) {
}
f ` \x 0 D ${ "Interrupted CRLF" } \x 0 A ` ;
🙁 Actual behavior
On TypeScript 5.0.4 (and earlier) tsc reports:
"Hexadecimal digit expected."
"'f' is declared but its value is never read."
On versions after 5.0.4 the errors disappear (based on my tests), indicating this was fixed in a later release.
🙂 Expected behavior
The code should compile without the "Hexadecimal digit expected." error.
Additional information about the issue
No response