Title:
Open Graph Title:
X Title:
Description: TypeScript Version: 2.8.0-dev.20180217 Search Terms: "is referenced directly or indirectly in its own type annotation" Code type Flatten
Open Graph Description: TypeScript Version: 2.8.0-dev.20180217 Search Terms: "is referenced directly or indirectly in its own type annotation" Code type Flatten
X Description: TypeScript Version: 2.8.0-dev.20180217 Search Terms: "is referenced directly or indirectly in its own type annotation" Code type Flatten<T> = { '1': Flatten<T extends Arr...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/22018
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\u003ckey\u003e is referenced directly or indirectly in its own type annotation","articleBody":"**TypeScript Version:** 2.8.0-dev.20180217\r\n\r\n**Search Terms:**\r\n- \"is referenced directly or indirectly in its own type annotation\"\r\n\r\n**Code**\r\n\r\n```ts\r\ntype Flatten\u003cT\u003e = {\r\n '1': Flatten\u003cT extends Array\u003cinfer U\u003e ? U : T\u003e;\r\n}[T extends number ? '1' : '1'];\r\n```\r\n(as mentioned in #21613)\r\n\r\n**Expected behavior:** ok\r\n\r\n**Actual behavior:**\r\n\r\n\u003e error TS2502: ''1'' is referenced directly or indirectly in its own type annotation.\r\n\r\n**Playground Link:** needs 2.8, playground is on 2.7\r\n\r\n**Related Issues:** #6230\r\n\r\nI saw similar issues on other types, though the greatest common denominator appeared to be recursion + conditional types (?).\r\n","author":{"url":"https://github.com/KiaraGrouwstra","@type":"Person","name":"KiaraGrouwstra"},"datePublished":"2018-02-17T23:50:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/22018/TypeScript/issues/22018"}
| 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:46f02304-93da-0eb6-05ff-7652f516aa8a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A26E:D0177:81D326:ABBB50:6A62A85A |
| html-safe-nonce | d85559bb64df07655da50d068eef2141079eeb8b020865f84da3cd61c0e01d46 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjZFOkQwMTc3OjgxRDMyNjpBQkJCNTA6NkE2MkE4NUEiLCJ2aXNpdG9yX2lkIjoiNzYyMjY1OTc4NjM3MjQ1ODU4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e63c814caa5f1ff5efe3aacfde9d19918184aab7728d1e31e2d92f73a7d52364 |
| hovercard-subject-tag | issue:298046333 |
| 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/22018/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c26fe78ae38bb318c1c3b34652578ada772db0f0dc802942ea9e715603c2e6ce/microsoft/TypeScript/issues/22018 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c26fe78ae38bb318c1c3b34652578ada772db0f0dc802942ea9e715603c2e6ce/microsoft/TypeScript/issues/22018 |
| og:image:alt | TypeScript Version: 2.8.0-dev.20180217 Search Terms: "is referenced directly or indirectly in its own type annotation" Code type Flatten |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KiaraGrouwstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | e362a1b5e54cdb52dad78dc403bb9e6a8362e7c0448a1d804fe243f9fac57954 |
| 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 | 5410e150d3e7c804f80827080c5f130c97eaf5a4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width