Title: Decouple jsx element type from jsx factory return type and sfc return type · Issue #21699 · microsoft/TypeScript · GitHub
Open Graph Title: Decouple jsx element type from jsx factory return type and sfc return type · Issue #21699 · microsoft/TypeScript
X Title: Decouple jsx element type from jsx factory return type and sfc return type · Issue #21699 · microsoft/TypeScript
Description: We need to look up the type of a jsx expression by actually resolving the jsx factory call, so that we don't create a reference to the global JSX.Element type, which can change shape between react versions (as it needs to in the react 16...
Open Graph Description: We need to look up the type of a jsx expression by actually resolving the jsx factory call, so that we don't create a reference to the global JSX.Element type, which can change shape between react ...
X Description: We need to look up the type of a jsx expression by actually resolving the jsx factory call, so that we don't create a reference to the global JSX.Element type, which can change shape between re...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/21699
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Decouple jsx element type from jsx factory return type and sfc return type","articleBody":"We need to look up the type of a jsx expression by actually resolving the jsx factory call, so that we don't create a reference to the global `JSX.Element` type, which can change shape between react versions (as it needs to in the react 16 upgrade). We also need to resolve the sfc return type and class element type from the parameters of the factory function overloads for the same reasons, doubly so because the types allowable as `render` method and `SFC` return values are no longer the same as `JSX.Element` (namely, they can be strings, arrays, portals, etc). \r\n\r\nThis _might_ be considered a breaking change, because some consumers may expect `JSX.Element` to always be a supertype of both jsx element expression return types and SFC return types (even though this isn't true in react 16) - we certainly made that assumption internally, hence the need for the change. 🐱 ","author":{"url":"https://github.com/weswigham","@type":"Person","name":"weswigham"},"datePublished":"2018-02-06T21:34:04Z","url":"https://github.com/microsoft/TypeScript/issues/21699"}
| 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:0e43c414-fe5b-04f6-becf-8b91b5385488 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E400:DB09F:C7E5A2:1000C59:6B0101F8 |
| html-safe-nonce | 1e9ecb0c6be43e0f2eb3994c0d3a9db4bc86d16b4bb533fa40eac3a32e81f076 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDAwOkRCMDlGOkM3RTVBMjoxMDAwQzU5OjZCMDEwMUY4IiwidmlzaXRvcl9pZCI6IjY2MzkzOTk2NjQ3NDU1MTM0NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 23ae9e4bbb6fdd7d394fe6e7a76e3c74ccaaea68b2521add3c535f7dd6895322 |
| hovercard-subject-tag | issue:294920456 |
| 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/21699/issue_layout |
| twitter:image | https://opengraph.githubassets.com/660ec74d696354dbac5d9dd5e9069cbe1ee26a6542c061de7f16544aa52c6a0c/microsoft/TypeScript/issues/21699 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/660ec74d696354dbac5d9dd5e9069cbe1ee26a6542c061de7f16544aa52c6a0c/microsoft/TypeScript/issues/21699 |
| og:image:alt | We need to look up the type of a jsx expression by actually resolving the jsx factory call, so that we don't create a reference to the global JSX.Element type, which can change shape between react ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | weswigham |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width