-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\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... |
π Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of this repro running against the nightly TypeScript. β Failed: -
Historical Information
|
Hi, is this issue being worked on? I would like to look into this as a first issue. |
I'm afraid such a change will break existing code. |
Bug Report
π Search Terms
String.raw
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Error reported:
error TS1125: Hexadecimal digit expected.
π Expected behavior
Complete transpile
The text was updated successfully, but these errors were encountered: