Title: Question: Why can't type parameters be used inside type parameters? · Issue #6224 · microsoft/TypeScript · GitHub
Open Graph Title: Question: Why can't type parameters be used inside type parameters? · Issue #6224 · microsoft/TypeScript
X Title: Question: Why can't type parameters be used inside type parameters? · Issue #6224 · microsoft/TypeScript
Description: Hey all, hoping to be educated by someone. I think I need to reuse type parameters inside type parameters (see example code below, specifically the reuse of Y), but this is firstly not allowed by TypeScript (and perhaps other languages t...
Open Graph Description: Hey all, hoping to be educated by someone. I think I need to reuse type parameters inside type parameters (see example code below, specifically the reuse of Y), but this is firstly not allowed by T...
X Description: Hey all, hoping to be educated by someone. I think I need to reuse type parameters inside type parameters (see example code below, specifically the reuse of Y), but this is firstly not allowed by T...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6224
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Question: Why can't type parameters be used inside type parameters?","articleBody":"Hey all, hoping to be educated by someone. I think I need to reuse type parameters inside type parameters (see example code below, specifically the reuse of `Y`), but this is firstly not allowed by TypeScript (and perhaps other languages too), and secondly it seems \"odd\". So I'm wondering, why can't type parameters be used inside type parameters? Is there a solution to this I'm missing?\n\n``` typescript\nclass A {\n // ...\n}\n\nclass B\u003cZ extends A> {\n public a: Z;\n // ...\n}\n\nclass C\u003cY extends A, X extends B\u003cY>> {\n public a: Y;\n public b: X;\n // ...\n}\n```\n","author":{"url":"https://github.com/ryasmi","@type":"Person","name":"ryasmi"},"datePublished":"2015-12-23T14:04:22Z","url":"https://github.com/microsoft/TypeScript/issues/6224"}
| 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:a18a5e04-f3c6-cfe9-1dab-66cea034a953 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4BA:2564D8:8E0A19:BE0CE8:6B00E150 |
| html-safe-nonce | 6aaecb39f0b39d7f6506dec99d33c1cb770e4f4e049643e79fb8919afa83165d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEJBOjI1NjREODo4RTBBMTk6QkUwQ0U4OjZCMDBFMTUwIiwidmlzaXRvcl9pZCI6IjUzOTU5OTgzMTc0OTY4MjAwNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b85d5ec92127279885cb2fa543a5aa12517aa5037ed67580796cfdea0d9ee3e5 |
| hovercard-subject-tag | issue:123664865 |
| 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/6224/issue_layout |
| twitter:image | https://opengraph.githubassets.com/42d3c39c007df3206446eb18cb67f885313035513abf39e7ea1866768454bee2/microsoft/TypeScript/issues/6224 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/42d3c39c007df3206446eb18cb67f885313035513abf39e7ea1866768454bee2/microsoft/TypeScript/issues/6224 |
| og:image:alt | Hey all, hoping to be educated by someone. I think I need to reuse type parameters inside type parameters (see example code below, specifically the reuse of Y), but this is firstly not allowed by T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ryasmi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| 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 | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width