Title: [T] tuple type information is lost as T[] · Issue #8276 · microsoft/TypeScript · GitHub
Open Graph Title: [T] tuple type information is lost as T[] · Issue #8276 · microsoft/TypeScript
X Title: [T] tuple type information is lost as T[] · Issue #8276 · microsoft/TypeScript
Description: TypeScript Version: nightly (1.9.0-dev.20160213) Code interface Geo { latlng: [number, number] // tuple } function world(geo: Geo) {} world({ latlng: [35, -112] }); // works fine let coordinates = { latlng: [35, -112] }; world(coordinate...
Open Graph Description: TypeScript Version: nightly (1.9.0-dev.20160213) Code interface Geo { latlng: [number, number] // tuple } function world(geo: Geo) {} world({ latlng: [35, -112] }); // works fine let coordinates = ...
X Description: TypeScript Version: nightly (1.9.0-dev.20160213) Code interface Geo { latlng: [number, number] // tuple } function world(geo: Geo) {} world({ latlng: [35, -112] }); // works fine let coordinates = ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/8276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[T] tuple type information is lost as T[]","articleBody":"**TypeScript Version:** \n\nnightly (1.9.0-dev.20160213)\n\n**Code**\n\n``` ts\ninterface Geo {\n latlng: [number, number] // tuple\n}\n\nfunction world(geo: Geo) {}\n\nworld({ latlng: [35, -112] }); // works fine\n\nlet coordinates = { latlng: [35, -112] };\nworld(coordinates); // errors\n\nlet coordinatesTyped: Geo = { latlng: [35, -112] };\nworld(coordinatesTyped); // works fine\n```\n\n**Expected behavior:**\n\nCompile without errors.\n\n**Actual behavior:** \n\nError, `[T]` tuple type information is lost as `T[]`:\n\n> Type 'number[]' is not assignable to type '[number, number]'.\n","author":{"url":"https://github.com/nathancahill","@type":"Person","name":"nathancahill"},"datePublished":"2016-04-24T20:01:02Z","url":"https://github.com/microsoft/TypeScript/issues/8276"}
| 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:649be28a-4d7c-c01a-2a71-61c5cbacfd0f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CC8:34CAB:848FCC:AA4A2C:6B00EB70 |
| html-safe-nonce | c9caa285d0644632e6fbc7ebc150b92db6f842aaca1ff90e621a879b33068e03 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0M4OjM0Q0FCOjg0OEZDQzpBQTRBMkM6NkIwMEVCNzAiLCJ2aXNpdG9yX2lkIjoiNzE4ODgxMzkyOTk0OTIyNzg4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 05aa41241f7a12921dbec1e798ac29b6de9e0e0db61ee46a864489d45b48900f |
| hovercard-subject-tag | issue:150695178 |
| 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/8276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/83cb874b2b2932e16fbe6d85fe8b593db0df41d34361f06c6447c8396f8bc1ec/microsoft/TypeScript/issues/8276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/83cb874b2b2932e16fbe6d85fe8b593db0df41d34361f06c6447c8396f8bc1ec/microsoft/TypeScript/issues/8276 |
| og:image:alt | TypeScript Version: nightly (1.9.0-dev.20160213) Code interface Geo { latlng: [number, number] // tuple } function world(geo: Geo) {} world({ latlng: [35, -112] }); // works fine let coordinates = ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathancahill |
| 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