Title: Top level await breaks with parentheses · Issue #35276 · microsoft/TypeScript · GitHub
Open Graph Title: Top level await breaks with parentheses · Issue #35276 · microsoft/TypeScript
X Title: Top level await breaks with parentheses · Issue #35276 · microsoft/TypeScript
Description: TypeScript Version: 3.7.2 Search Terms: Top Code const v = await (1); Expected behavior: No error thrown. (If renaming this file to .js extension, it would be accepted by runtimes that enables top-level await e.g. Deno, indicating this i...
Open Graph Description: TypeScript Version: 3.7.2 Search Terms: Top Code const v = await (1); Expected behavior: No error thrown. (If renaming this file to .js extension, it would be accepted by runtimes that enables top-...
X Description: TypeScript Version: 3.7.2 Search Terms: Top Code const v = await (1); Expected behavior: No error thrown. (If renaming this file to .js extension, it would be accepted by runtimes that enables top-...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/35276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Top level await breaks with parentheses","articleBody":"**TypeScript Version:** 3.7.2\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** Top \r\n\r\n**Code**\r\n\r\n```ts\r\nconst v = await (1);\r\n```\r\n\r\n**Expected behavior:**\r\nNo error thrown. (If renaming this file to `.js` extension, it would be accepted by runtimes that enables top-level await e.g. Deno, indicating this is accepted by engines like V8)\r\n\r\n**Actual behavior:**\r\n```\r\nerror TS2304: Cannot find name 'await'.\r\n\r\n► file:///Users/kun/Projects/Deno/test/tla.ts:5:11\r\n\r\n5 const v = await (1);\r\n ~~~~~\r\n```\r\n\r\n**Playground Link:** Not available\r\n\r\n**Related Issues:** Not found\r\n","author":{"url":"https://github.com/kevinkassimo","@type":"Person","name":"kevinkassimo"},"datePublished":"2019-11-21T21:32:36Z","url":"https://github.com/microsoft/TypeScript/issues/35276"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:48161bb6-22c2-24ac-b5a7-f9ba41704c77 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDEA:16EED3:8940AC:B0220B:6B00EB62 |
| html-safe-nonce | 637b70342f59fc7c4a2148c104bd960c50fcde46069448c7c725089883e39330 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREVBOjE2RUVEMzo4OTQwQUM6QjAyMjBCOjZCMDBFQjYyIiwidmlzaXRvcl9pZCI6IjY4NDM3ODIxNDc0NTE0NDgxNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5a0c4c065905f5cb81e5f84c1c341d47e5ee928b68e612e23b7ef814419696f5 |
| hovercard-subject-tag | issue:526853230 |
| 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/35276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b2a512f824caed9d6bd4fbde873a33c91f491268bb5a0455c0f51de0f78a2be/microsoft/TypeScript/issues/35276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b2a512f824caed9d6bd4fbde873a33c91f491268bb5a0455c0f51de0f78a2be/microsoft/TypeScript/issues/35276 |
| og:image:alt | TypeScript Version: 3.7.2 Search Terms: Top Code const v = await (1); Expected behavior: No error thrown. (If renaming this file to .js extension, it would be accepted by runtimes that enables top-... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kevinkassimo |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width