Title: Spreads instantiated with array subtypes types exhibit bad behavior · Issue #26110 · microsoft/TypeScript · GitHub
Open Graph Title: Spreads instantiated with array subtypes types exhibit bad behavior · Issue #26110 · microsoft/TypeScript
X Title: Spreads instantiated with array subtypes types exhibit bad behavior · Issue #26110 · microsoft/TypeScript
Description: Found by playing around with @mattmccutchen's example at #26013 (comment): interface CoolArray
Open Graph Description: Found by playing around with @mattmccutchen's example at #26013 (comment): interface CoolArray
X Description: Found by playing around with @mattmccutchen's example at #26013 (comment): interface CoolArray<E> extends Array<E> { hello: number; } declare function foo<T extends any[]>(cb:...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26110
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Spreads instantiated with array subtypes types exhibit bad behavior","articleBody":"Found by playing around with @mattmccutchen's example at https://github.com/Microsoft/TypeScript/issues/26013#issuecomment-409330936:\r\n\r\n```ts\r\ninterface CoolArray\u003cE\u003e extends Array\u003cE\u003e { \r\n hello: number;\r\n}\r\n\r\ndeclare function foo\u003cT extends any[]\u003e(cb: (...args: T) =\u003e void): void;\r\n\r\nfoo\u003cCoolArray\u003cany\u003e\u003e(); // error\r\nfoo\u003cCoolArray\u003cany\u003e\u003e(100); // error\r\nfoo\u003cCoolArray\u003cany\u003e\u003e(foo); // no error!!\r\n```\r\n\r\n**Expected**: All of these calls produce an error and have a good error message.\r\n**Actual**: The first two have bad errors, the last one is considered okay.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2018-08-01T03:39:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/26110/TypeScript/issues/26110"}
| 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:512545fb-e31b-c9f0-ca4e-3ea59f3b8c8d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88A4:B7853:36D9FB:50C710:6A61E7B3 |
| html-safe-nonce | f004704c3608258c13b23a9f3dd62bd37531ca26138b13c6c5921a7c5c87948a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEE0OkI3ODUzOjM2RDlGQjo1MEM3MTA6NkE2MUU3QjMiLCJ2aXNpdG9yX2lkIjoiNjAzMTQ1OTQ3MzYyMTY0MTEzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7518733e00bb739cf310236edbfe25a3fb8554a5ee9b7222ee4b502cdde8b642 |
| hovercard-subject-tag | issue:346436441 |
| 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/26110/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca2232a362a6e7232b3752f728fb464938559675abc57eb20b051c661a6f53c0/microsoft/TypeScript/issues/26110 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca2232a362a6e7232b3752f728fb464938559675abc57eb20b051c661a6f53c0/microsoft/TypeScript/issues/26110 |
| og:image:alt | Found by playing around with @mattmccutchen's example at #26013 (comment): interface CoolArray |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| 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 | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width