\u
in String.raw
#42887
\u
in String.raw
#42887
Comments
@Kingwl you might be interested in this one. |
It’s not just const taggedTemplate = (template: TemplateStringsArray, ...substitutions: unknown[]) => {
console.log(template, substitutions);
}
// Logs:
// [
// undefined, "bar", undefined,
// raw: [ "foo\\uvar", "bar", "baz\\u" ]
// ]
// [ 123, 456 ]
taggedTemplate`foo\uvar${123}bar${456}baz\u`; Also, this doesn’t occur when the |
Sorry I'm not 100% sure what your means. The current problem is falsely alarm. Here's some context: And I have found an PR who try to fix a part of the alarm: #41030 |
The definition of |
Ahhhh Okay. Got the point. Thanks. |
I think that dealing with octal escapes in all strings #396 should be done before dealing with tagged templates as an exception... |
Bug Report
String.raw
Playground link with relevant code
Error reported:
error TS1125: Hexadecimal digit expected.
Complete transpile
The text was updated successfully, but these errors were encountered: