Title: Tuples constructed via array literals don't typecheck against tuple constraints · Issue #3369 · microsoft/TypeScript · GitHub
Open Graph Title: Tuples constructed via array literals don't typecheck against tuple constraints · Issue #3369 · microsoft/TypeScript
X Title: Tuples constructed via array literals don't typecheck against tuple constraints · Issue #3369 · microsoft/TypeScript
Description: type Point = [number, number]; var x = [1, 2]; var p: Point = x; In this case p won't typecheck because x has been inferred as number[] instead of [number, number]. It would be really nice if the type system could check against both types.
Open Graph Description: type Point = [number, number]; var x = [1, 2]; var p: Point = x; In this case p won't typecheck because x has been inferred as number[] instead of [number, number]. It would be really nice if the t...
X Description: type Point = [number, number]; var x = [1, 2]; var p: Point = x; In this case p won't typecheck because x has been inferred as number[] instead of [number, number]. It would be really nice if t...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/3369
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tuples constructed via array literals don't typecheck against tuple constraints","articleBody":"``` ts\ntype Point = [number, number]; var x = [1, 2]; var p: Point = x;\n```\n\nIn this case `p` won't typecheck because x has been inferred as `number[]` instead of `[number, number]`. It would be really nice if the type system could check against both types.\n","author":{"url":"https://github.com/ccapndave","@type":"Person","name":"ccapndave"},"datePublished":"2015-06-03T21:02:10Z","url":"https://github.com/microsoft/TypeScript/issues/3369"}
| 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:1f95d7cc-d7c9-6283-d914-f71a2b17a0c8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF62:19E4BB:9BFC83:C8CDB0:6B00F19C |
| html-safe-nonce | d69fbe3a70a6534f73369687aa417ab43ef40a63e1e1f6dcab805a0a86b5b0bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjYyOjE5RTRCQjo5QkZDODM6QzhDREIwOjZCMDBGMTlDIiwidmlzaXRvcl9pZCI6IjUzMTEyNTczNDU3MzEzOTE5MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 69645f39c1138d0b297fda7559e86e4eb8256ee87430c8b2aa30ff5d416b036f |
| hovercard-subject-tag | issue:84770211 |
| 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/3369/issue_layout |
| twitter:image | https://opengraph.githubassets.com/45ca05c830e7a28eedcca7388dc32a429a708ead7eef0e34865c4a92be3f6934/microsoft/TypeScript/issues/3369 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/45ca05c830e7a28eedcca7388dc32a429a708ead7eef0e34865c4a92be3f6934/microsoft/TypeScript/issues/3369 |
| og:image:alt | type Point = [number, number]; var x = [1, 2]; var p: Point = x; In this case p won't typecheck because x has been inferred as number[] instead of [number, number]. It would be really nice if the t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ccapndave |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width