Title: raw tagged string doesn't support for `\x` · Issue #39715 · microsoft/TypeScript · GitHub
Open Graph Title: raw tagged string doesn't support for `\x` · Issue #39715 · microsoft/TypeScript
X Title: raw tagged string doesn't support for `\x` · Issue #39715 · microsoft/TypeScript
Description: TypeScript Version: 3.9 Search Terms: Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc. function raw(x...
Open Graph Description: TypeScript Version: 3.9 Search Terms: Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another build tool su...
X Description: TypeScript Version: 3.9 Search Terms: Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another build tool su...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/39715
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"raw tagged string doesn't support for `\\x`","articleBody":"\u003c!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n--\u003e\r\n\r\n\u003c!--\r\nPlease try to reproduce the issue with the latest published version. It may have already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n--\u003e\r\n**TypeScript Version:** 3.9\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) --\u003e\r\n**Search Terms:**\r\n\r\n**Code**\r\n\r\n```ts\r\n// A *self-contained* demonstration of the problem follows...\r\n// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.\r\n\r\nfunction raw(x: TemplateStringsArray)\r\n{\r\n return x.raw;\r\n}\r\nconst originEnv =raw`\\x`\r\n\r\n```\r\n\r\n**Expected behavior:**\r\n```\r\nRunning and output\r\n```\r\n**Actual behavior:**\r\n```\r\nts-node gen-env.ts\r\n\r\nC:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:434\r\n return new TSError(diagnosticText, diagnosticCodes)\r\n ^\r\nTSError: ⨯ Unable to compile TypeScript:\r\ngen-env.ts:6:24 - error TS1125: Hexadecimal digit expected.\r\n\r\n6 const originEnv =raw`\\x`\r\n\r\n\r\n at createTSError (C:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:434:12)\r\n at reportTSError (C:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:438:19)\r\n at getOutput (C:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:578:36)\r\n at Object.compile (C:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:775:32)\r\n at Module.m._compile (C:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:858:43)\r\n at Module._extensions..js (internal/modules/cjs/loader.js:1158:10)\r\n at Object.require.extensions.\u003ccomputed\u003e [as .ts] (C:\\Users\\lygstate\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:861:12)\r\n at Module.load (internal/modules/cjs/loader.js:986:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:879:14)\r\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)\r\n\r\n```\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior --\u003e\r\nhttps://www.staging-typescript.org/play?target=7#code/PTAEEFQKgZwUwDYDMC0BjA9gOwC4EMBLLOAEylBLgFtsYcAnPHA7UDJUHACzlAAd6GAEYJqoJBgQIMAdxgA6RQFgAUCFAAVOHU5cCMUEICeoegFcsWIgHNQAAxww0dtll29MVKniwkUCIjgAGlMmHnpdH11BM2suUB8MbjgIoTMCBBJODElQGDM0eLwDAHEzBD4QgHU4IT48NABrELgcNHlVVSQLNGZWRhkACgAPAC5Naj4EJjgAZQYbGHB6RiMASlUAb1VQXdNWs3o3YfkBgG5VAF9VTCwdDHoCayIAUSwAN1AAXgG7AB1hnZVEA\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? --\u003e\r\n","author":{"url":"https://github.com/lygstate","@type":"Person","name":"lygstate"},"datePublished":"2020-07-23T10:25:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/39715/TypeScript/issues/39715"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ccd60d07-11fd-8461-b487-e3c170603da7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D126:8B463:90E00A:C914E8:6A6249F7 |
| html-safe-nonce | 89f099f8aa5347986d4bf4468ecc972485197f0f6b41bf49d736dd0e439f3bde |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTI2OjhCNDYzOjkwRTAwQTpDOTE0RTg6NkE2MjQ5RjciLCJ2aXNpdG9yX2lkIjoiMTEyNzkzNzA3MTc0NTQ4NTMwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 654d452a575ce216609a77705e12094f29d44b28ebccf9e80e7b3e46e689b333 |
| hovercard-subject-tag | issue:664364236 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/39715/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6dc06fbec63373a4b6ca5e91c559e25ff02a1be6c61b6648cf6c9169461b54a4/microsoft/TypeScript/issues/39715 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6dc06fbec63373a4b6ca5e91c559e25ff02a1be6c61b6648cf6c9169461b54a4/microsoft/TypeScript/issues/39715 |
| og:image:alt | TypeScript Version: 3.9 Search Terms: Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another build tool su... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lygstate |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5d6ba65d73ecc4e3394fe318d2b2f98e6f8eed4878b5421b938e20d30bde267b |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2dadc56fd5989b76a8ae7304e3aa56d0b485e5dc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width