Title: TS may parse type parameter lists as JSX · Issue #26179 · microsoft/TypeScript · GitHub
Open Graph Title: TS may parse type parameter lists as JSX · Issue #26179 · microsoft/TypeScript
X Title: TS may parse type parameter lists as JSX · Issue #26179 · microsoft/TypeScript
Description: TS may mistakenly use generics as jsx,but it's ok on vscode. TypeScript Version: 3.0.1 Search Terms: jsx generics, class generics Code const a =
Open Graph Description: TS may mistakenly use generics as jsx,but it's ok on vscode. TypeScript Version: 3.0.1 Search Terms: jsx generics, class generics Code const a =
X Description: TS may mistakenly use generics as jsx,but it's ok on vscode. TypeScript Version: 3.0.1 Search Terms: jsx generics, class generics Code const a = <T = any>(): Array<T> => { return...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26179
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TS may parse type parameter lists as JSX","articleBody":"TS may mistakenly use generics as jsx,but it's ok on vscode.\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.0.1\r\n\r\n**Search Terms:**\r\njsx generics, class generics\r\n\r\n**Code**\r\n\r\n```ts\r\nconst a = \u003cT = any>(): Array\u003cT> => {\r\n return;\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n\r\n\r\n\r\n**Actual behavior:**\r\n\r\n\r\n\r\n**Playground Link:** \r\ncompile errror:\r\nhttps://agentcooper.github.io/typescript-play/?jsx=1#code/MYewdgzgLgBAhjAvDAPAFSfMBPAfACgEoAuGAQQCcK5t1cl6BvAWACgYOYKBTKAVwpgA3GwC+QA\r\n\r\nbut code on this is [OK ](http://www.typescriptlang.org/play/#src=const%20a%20%3D%20%3CT%20%3D%20any%3E()%3A%20Array%3CT%3E%20%3D%3E%20%7B%0D%0A%20%20%20%20return%3B%0D%0A%7D)\r\n","author":{"url":"https://github.com/AlexStacker","@type":"Person","name":"AlexStacker"},"datePublished":"2018-08-03T03:30:34Z","url":"https://github.com/microsoft/TypeScript/issues/26179"}
| 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:982d3f2d-96a0-0da3-0c9d-2b20f73e253b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA4E:76F02:A73836:D8C800:6B00E759 |
| html-safe-nonce | 17262f9226be7e284a730169494af12091fe08ae48f7b98ad30594d56c644644 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTRFOjc2RjAyOkE3MzgzNjpEOEM4MDA6NkIwMEU3NTkiLCJ2aXNpdG9yX2lkIjoiMzI5Nzg5MjY3NDgyMDQ0MjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 526feda1da5050d1f9abcf9356e55689d0245ebf28911baee65710ba6f36aa25 |
| hovercard-subject-tag | issue:347246836 |
| 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/26179/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba8a8389314a65df470d5f4e512899f495ff001a7f74b756c62b269571091743/microsoft/TypeScript/issues/26179 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba8a8389314a65df470d5f4e512899f495ff001a7f74b756c62b269571091743/microsoft/TypeScript/issues/26179 |
| og:image:alt | TS may mistakenly use generics as jsx,but it's ok on vscode. TypeScript Version: 3.0.1 Search Terms: jsx generics, class generics Code const a = |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexStacker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| 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 | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width