Title: Tuples as types for rest ...arguments · Issue #5331 · microsoft/TypeScript · GitHub
Open Graph Title: Tuples as types for rest ...arguments · Issue #5331 · microsoft/TypeScript
X Title: Tuples as types for rest ...arguments · Issue #5331 · microsoft/TypeScript
Description: This feature could be used in observable-like generic classes/interfaces: interface EventSource
Open Graph Description: This feature could be used in observable-like generic classes/interfaces: interface EventSource
X Description: This feature could be used in observable-like generic classes/interfaces: interface EventSource<Args extends any[]> { observe(listener: (...args: Args)): void; map<T>(mapping: (...args:...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/5331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tuples as types for rest ...arguments","articleBody":"This feature could be used in observable-like generic classes/interfaces:\n\n``` ts\ninterface EventSource\u003cArgs extends any[]\u003e {\n observe(listener: (...args: Args)): void;\n map\u003cT\u003e(mapping: (...args: Args) =\u003e T): EventSource\u003c[T]\u003e;\n}\n```\n\nCurrently the only way I know of is to fallback to `any`.\n","author":{"url":"https://github.com/g162h3","@type":"Person","name":"g162h3"},"datePublished":"2015-10-19T22:47:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/5331/TypeScript/issues/5331"}
| 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:45f4ef87-0f70-66f9-9661-b26dccc3f877 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D954:9608D:7CDDBF:A75BC5:6A618470 |
| html-safe-nonce | 9f85998688e19a3752394a2d03af46e35ffeb837ac1a2bb4d9f903ff7875fd8e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTU0Ojk2MDhEOjdDRERCRjpBNzVCQzU6NkE2MTg0NzAiLCJ2aXNpdG9yX2lkIjoiMTg5NTI5NzIyNzU5MTYxNTYwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ea0842437003594c74dc400700dd4aefe20c80345c33fb7369fe059426f5f8c0 |
| hovercard-subject-tag | issue:112248763 |
| 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/5331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/71b2fdf2ea2b45969bac4ad386caf6e176dd095a7c858b11cacde5265b4a708a/microsoft/TypeScript/issues/5331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/71b2fdf2ea2b45969bac4ad386caf6e176dd095a7c858b11cacde5265b4a708a/microsoft/TypeScript/issues/5331 |
| og:image:alt | This feature could be used in observable-like generic classes/interfaces: interface EventSource |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | g162h3 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c28c2f6607f2aacbd934868d997038895c9780d08babfe918550d73773326f4c |
| 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 | cd05235d52ffb3318513d883a56c87a121015c8b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width