Title: Generic meta types · Issue #3779 · microsoft/TypeScript · GitHub
Open Graph Title: Generic meta types · Issue #3779 · microsoft/TypeScript
X Title: Generic meta types · Issue #3779 · microsoft/TypeScript
Description: As far as I know, in Flow there are so called "generic meta types" that can operate on other types: type C = $Merge<{a: number}, {b: string}>; // C = { a: number, b: string } type A = $Args<(a: number, b: string) => void>; // A = [number...
Open Graph Description: As far as I know, in Flow there are so called "generic meta types" that can operate on other types: type C = $Merge<{a: number}, {b: string}>; // C = { a: number, b: string } type A = $Args<(a: num...
X Description: As far as I know, in Flow there are so called "generic meta types" that can operate on other types: type C = $Merge<{a: number}, {b: string}>; // C = { a: number, b: string } type A...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/3779
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Generic meta types","articleBody":"As far as I know, in Flow there are so called \"generic meta types\" that can operate on other types:\n\n``` ts\ntype C = $Merge\u003c{a: number}, {b: string}>; // C = { a: number, b: string }\ntype A = $Args\u003c(a: number, b: string) => void>; // A = [number, string]\n```\n\nSuch \"type algebra\" would be useful to construct function signatures and interfaces that are hard/impossible to construct with other techniques:\n\n``` ts\ninterface TaggedFunction\u003cCallable extends (...args) => any> {\n type Args = $Args\u003cCallable>;\n type RetV = $RetV\u003cCallable>;\n\n (...args: ...Args): RetV;\n tag: number;\n bind\u003c...T>(...args: ...T): TaggedFunction\u003c(...args: $Concat\u003cArgs, ...T>) => RetV>;\n}\n```\n\nDo you think this would be a useful addition to the type system?\n","author":{"url":"https://github.com/d180cf","@type":"Person","name":"d180cf"},"datePublished":"2015-07-08T03:25:00Z","url":"https://github.com/microsoft/TypeScript/issues/3779"}
| 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:202c2a22-8b9d-c865-8974-3b03c840a3fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BAAC:2FA59:8738A3:AFBA79:6B00D9A2 |
| html-safe-nonce | 3ec170eecf887f63c36e12af706d9de4364cd7113d48c632d01eeb1dbd50c1b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUFDOjJGQTU5Ojg3MzhBMzpBRkJBNzk6NkIwMEQ5QTIiLCJ2aXNpdG9yX2lkIjoiODEwMDI2NTM0NTU4NTU0NTMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6bbb445be5f77beff2e8b456ff2680e557b85fb572176ac9122168e9c9b5f87e |
| hovercard-subject-tag | issue:93682076 |
| 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/3779/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d6263f6f3c707f5196c46c5d3972e62723c367d2240150cd11872b7b41be3954/microsoft/TypeScript/issues/3779 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d6263f6f3c707f5196c46c5d3972e62723c367d2240150cd11872b7b41be3954/microsoft/TypeScript/issues/3779 |
| og:image:alt | As far as I know, in Flow there are so called "generic meta types" that can operate on other types: type C = $Merge<{a: number}, {b: string}>; // C = { a: number, b: string } type A = $Args<(a: num... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | d180cf |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| 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 | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width