Title: Parentheses causes TS Playground to crash · Issue #38 · microsoft/TypeScript-Website · GitHub
Open Graph Title: Parentheses causes TS Playground to crash · Issue #38 · microsoft/TypeScript-Website
X Title: Parentheses causes TS Playground to crash · Issue #38 · microsoft/TypeScript-Website
Description: TypeScript Version: 3.5.1 Search Terms: parentheses, max call stack size Code const x = (/*snip some parentheses*/(42)/*snip some parentheses*/); const y : 41 = x; I was curious if TS would optimize away extra parentheses when parsing an...
Open Graph Description: TypeScript Version: 3.5.1 Search Terms: parentheses, max call stack size Code const x = (/*snip some parentheses*/(42)/*snip some parentheses*/); const y : 41 = x; I was curious if TS would optimiz...
X Description: TypeScript Version: 3.5.1 Search Terms: parentheses, max call stack size Code const x = (/*snip some parentheses*/(42)/*snip some parentheses*/); const y : 41 = x; I was curious if TS would optimiz...
Opengraph URL: https://github.com/microsoft/TypeScript-Website/issues/38
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parentheses causes TS Playground to crash","articleBody":"\u003c!-- 🚨 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-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.5.1\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n\r\nparentheses, max call stack size\r\n\r\n**Code**\r\n\r\n```ts\r\nconst x = (/*snip some parentheses*/(42)/*snip some parentheses*/);\r\nconst y : 41 = x;\r\n```\r\n\r\nI was curious if TS would optimize away extra parentheses when parsing and constructing its AST and whatnot.\r\n\r\nIs this why @keithlayne hates unnecessary parentheses?\r\n\r\n**Expected behavior:**\r\n\r\n`42` should not be assignable to `41`\r\n\r\n**Actual behavior:**\r\n\r\n\r\n\r\n\r\n**Playground Link:** [Playground](http://www.typescriptlang.org/play/#code/MYewdgzgLgBAHjAvDAFG9HNez3f8GFHEmlnkWVXU2130ONPMutvseddUAsATAEohwkaLHiJkqdJmy58hYqXKVqteo2at2nbr36Dho8ZOmzagFChIsAJ4wAXDB4BGJPADcQA)\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\n","author":{"url":"https://github.com/AnyhowStep","@type":"Person","name":"AnyhowStep"},"datePublished":"2019-08-02T21:03:33Z","url":"https://github.com/microsoft/TypeScript-Website/issues/38"}
| 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:70ad3609-ec48-b1d5-ccc6-e555cf5581cb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A95C:928E2:27F97C1:355DAD5:6B01B35E |
| html-safe-nonce | e097a2eda9fc76d14b3b6d8c57a82ac2ce3556e4f1efaf92683e5e3d173fac10 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTVDOjkyOEUyOjI3Rjk3QzE6MzU1REFENTo2QjAxQjM1RSIsInZpc2l0b3JfaWQiOiI0Nzg3MjI0MTA4MTU5MDU0Njg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ddbd67af11b00a3daec504dca533c4b6a127732208fbf4430b29869df21c4fbb |
| hovercard-subject-tag | issue:477401217 |
| 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-Website/38/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87e084a75b172dd653758395c151bbe3418109e31a3c90bbaf6691de12fb035a/microsoft/TypeScript-Website/issues/38 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87e084a75b172dd653758395c151bbe3418109e31a3c90bbaf6691de12fb035a/microsoft/TypeScript-Website/issues/38 |
| og:image:alt | TypeScript Version: 3.5.1 Search Terms: parentheses, max call stack size Code const x = (/*snip some parentheses*/(42)/*snip some parentheses*/); const y : 41 = x; I was curious if TS would optimiz... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AnyhowStep |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript-Website git https://github.com/microsoft/TypeScript-Website.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 193992134 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript-Website |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193992134 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript-Website |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width