Title: TSX spread regression in 2.3 · Issue #15420 · microsoft/TypeScript · GitHub
Open Graph Title: TSX spread regression in 2.3 · Issue #15420 · microsoft/TypeScript
X Title: TSX spread regression in 2.3 · Issue #15420 · microsoft/TypeScript
Description: TypeScript Version: 2.3.1 Code import * as React from 'react'; function test
Open Graph Description: TypeScript Version: 2.3.1 Code import * as React from 'react'; function test
X Description: TypeScript Version: 2.3.1 Code import * as React from 'react'; function test<T extends object>(Component: React.StatelessComponent<T>, props: T) { return <Component {...props...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/15420
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TSX spread regression in 2.3","articleBody":"**TypeScript Version:** 2.3.1\r\n\r\n**Code**\r\n\r\n```ts\r\nimport * as React from 'react';\r\n\r\nfunction test\u003cT extends object>(Component: React.StatelessComponent\u003cT>, props: T) {\r\n return \u003cComponent {...props} />\r\n ~~~~~~~~~~ error TS2698: Spread types may only be created from object types.\r\n}\r\n```\r\n(same with `React.ComponentClass`)\r\n\r\n**Expected behavior:**\r\n\r\nCompile without an error.\r\n\r\n**Actual behavior:**\r\n\r\nError: error TS2698: Spread types may only be created from object types.\r\n\r\nThat was already reported in closed issue #14112 \r\n\r\n","author":{"url":"https://github.com/Igorbek","@type":"Person","name":"Igorbek"},"datePublished":"2017-04-27T20:39:47Z","url":"https://github.com/microsoft/TypeScript/issues/15420"}
| 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:c5815a48-bb3e-83f1-cca9-5eae8dbe253f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A834:1F927B:CC43C8:10DA183:6B01C757 |
| html-safe-nonce | 7139c46d82534739567e81af747aa955f9f9192d148f55691111538bd9f8a35d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODM0OjFGOTI3QjpDQzQzQzg6MTBEQTE4Mzo2QjAxQzc1NyIsInZpc2l0b3JfaWQiOiIxMTcwMTc1Mjc5MDg4Mzg3OTI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d034681ca28b5387422e8a29d0c71417ab39b6f685eafbd2f119ec389b46512d |
| hovercard-subject-tag | issue:224906382 |
| 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/15420/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d33505b08d9c9a132d3b28329392b6679d016aa0a62354d97b86dfdb4ccc00c/microsoft/TypeScript/issues/15420 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d33505b08d9c9a132d3b28329392b6679d016aa0a62354d97b86dfdb4ccc00c/microsoft/TypeScript/issues/15420 |
| og:image:alt | TypeScript Version: 2.3.1 Code import * as React from 'react'; function test |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Igorbek |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width