René's URL Explorer Experiment


Title: Inconsistent type inference when changing the order of type declarations (5.0 regression) · Issue #55666 · microsoft/TypeScript · GitHub

Open Graph Title: Inconsistent type inference when changing the order of type declarations (5.0 regression) · Issue #55666 · microsoft/TypeScript

X Title: Inconsistent type inference when changing the order of type declarations (5.0 regression) · Issue #55666 · microsoft/TypeScript

Description: 🔎 Search Terms N/A — not sure which part of the playground code causes the issue 🕗 Version & Regression Information No bug on 4.9.5 The bug can be observed starting from 5.0.4 ⏯ Playground Link https://www.typescriptlang.org/play?#code/C...

Open Graph Description: 🔎 Search Terms N/A — not sure which part of the playground code causes the issue 🕗 Version & Regression Information No bug on 4.9.5 The bug can be observed starting from 5.0.4 ⏯ Playground Link htt...

X Description: 🔎 Search Terms N/A — not sure which part of the playground code causes the issue 🕗 Version & Regression Information No bug on 4.9.5 The bug can be observed starting from 5.0.4 ⏯ Playground Link...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/55666

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent type inference when changing the order of type declarations (5.0 regression)","articleBody":"### 🔎 Search Terms\r\n\r\nN/A — not sure which part of the playground code causes the issue\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n* No bug on 4.9.5\r\n* The bug can be observed starting from 5.0.4\r\n\r\n### ⏯ Playground Link\r\n\r\nhttps://www.typescriptlang.org/play?#code/C4TwDgpgBA4gTgQzACwIoBkByB7AdgZQFcAjfCAGwgGNgFjKoBeAKCigB8oBnYOAS1wBzVhygBBOIhAAeHvyGjchcuVGFcAEwgAzARA0A+EZyUrjUdVt259AbmahIsRCgxFSFarXrQWbTvBIaOgA8sQAVl7mElLSga6hEV6Kyqqcljp6hvaO0PHBAGoI5IS+zkEYOAQkZJQ0dAwBLsHutV4NEPYA9F1QEFzkAsAAtBp8XB3DNgAeI4M2UAACuVxU-GAj-fPAXVR4XOPAELgjAlrT+sPYSTTDPCCUADTL4P1rfBvDW0O7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d0sdRBFE4LKvjcL8uFvr9VORxklrRtW07UyRMiWtHOVs3u2Mg7yummbueModhL9UTI-Q4naeI8wlIYliLeMm3UVHEhcUctg2CrzbpH11AuimpBseTjpI1QHyJxwCAiJ77BXDA7goPzuZENx0NePQqgpRXzfIj+lvmoDwSkxngL0aNN6ryASoLwVpkwfycHycscBcDFHQAIdEiIL68GvqjPe8xMQaA5HAbAIowEbwAXAKBIDcBwMzumCBpEnJYJ-rgv+DC4BoJjlweA2BCBgCoTA0BuJyGr04eibhxC+ECMtHgWhZ8RGAOAYI3Av82BgggCKe+4CKGokJHI-G7CxESN4WATBl8cHLUEJIsAYiwGINXig8gYjRDBTBi-GOkMpz6KzoY9BxipFKJkSouunkjgimEb4rhPC+HeKcKXEJbB-6QMCfmXEe81FhK0eky6Ul5QqWZC1N2bVsK4QjAouAO84CxnKdOZ61IRD1PqWfAAkmExE2dibFFJl-TUIBYxGxpG+BcS59jfmmLiVpGj7BfigDibR28ilaTUJoEE+hETTHsEAA\r\n\r\n### 💻 Code\r\n\r\nApologies if the example is too long. I did my best to reduce it as much as possible, having encountered this bug in production.\r\n\r\n```ts repro\r\ntype GraphQLNonSubSelectable =\r\n  | string\r\n  | Array\u003cstring | null | undefined>\r\n  | null\r\n  | undefined;\r\ntype GraphQLSubSelectable =\r\n  | GraphQLObject\r\n  | Array\u003cGraphQLObject | null | undefined>;\r\ntype GraphQLValue = GraphQLNonSubSelectable | GraphQLSubSelectable;\r\ntype GraphQLObject = { [key: string]: GraphQLValue };\r\n\r\nconst TRANSFORMER = Symbol('TRANSFORMER');\r\n\r\ninterface SubSelectableFieldsSelectionOptions {\r\n  [TRANSFORMER]?: TransformerReference\u003cobject, GraphQLObject>;\r\n}\r\n\r\ntype FieldsSelectionOptions\u003cT> = T extends GraphQLSubSelectable\r\n  ? SubSelectableFieldsSelectionOptions\r\n  : NonNullable\u003cunknown>;\r\n\r\ndeclare const TRANSFORMER_REFERENCE_TYPE: unique symbol;\r\ndeclare const TRANSFORMER_REFERENCE_TRANSFORMER: unique symbol;\r\ninterface TransformerReference\u003c\r\n  TTransformer extends object,\r\n  TType extends GraphQLObject,\r\n> {\r\n  [TRANSFORMER_REFERENCE_TYPE]: TType;\r\n  [TRANSFORMER_REFERENCE_TRANSFORMER]: TTransformer;\r\n}\r\n\r\ntype UnwrapSubSelectable\u003cT extends GraphQLSubSelectable> = T extends Array\u003c\r\n  infer V\r\n>\r\n  ? NonNullable\u003cV>\r\n  : T;\r\n\r\ninterface ObjectWithTransformerOption\u003c\r\n  TTransformer extends object,\r\n  TType extends GraphQLObject,\r\n> {\r\n  [TRANSFORMER]: TransformerReference\u003cTTransformer, TType>;\r\n}\r\n\r\ntype FieldPathObject\u003cT extends GraphQLObject> = {\r\n  [K in keyof T]?: T[K] extends infer V\r\n    ? V extends GraphQLSubSelectable\r\n      ? FieldPathObject\u003cUnwrapSubSelectable\u003cV>>\r\n      : NonNullable\u003cunknown>\r\n    : never;\r\n} & FieldsSelectionOptions\u003cT>;\r\n\r\ntype FieldSubPathValue\u003cV, TSubPath> = V extends GraphQLNonSubSelectable\r\n  ? V\r\n  : V extends GraphQLSubSelectable\r\n  ? TSubPath extends FieldPathObject\u003cUnwrapSubSelectable\u003cV>>\r\n    ? V extends GraphQLObject\r\n      ? FieldPathValue\u003cUnwrapSubSelectable\u003cV>, TSubPath>\r\n      : TSubPath extends ObjectWithTransformerOption\u003c\r\n          infer TTransformer,\r\n          UnwrapSubSelectable\u003cV>\r\n        >\r\n      ? TTransformer\r\n      : unknown\r\n    : never\r\n  : never;\r\n\r\ntype FieldPathValue\u003c\r\n  T extends GraphQLObject,\r\n  TPath extends FieldPathObject\u003cT>,\r\n> = {\r\n  [K in keyof TPath]: K extends keyof T\r\n    ? FieldSubPathValue\u003cT[K], TPath[K]>\r\n    : never;\r\n}[keyof TPath];\r\n\r\ninterface FooterTransformer {\r\n  field: unknown;\r\n}\r\n\r\ntype Entry = {\r\n  sys: NonNullable\u003cunknown>;\r\n};\r\n\r\ntype Query = {\r\n  footerCollection?: FooterCollection;\r\n};\r\n\r\ntype ExternalLink = Entry & {\r\n  linkedFrom?: FooterCollection;\r\n};\r\n\r\ntype Footer = Entry & {\r\n  footerLinksGroupCollection?: FooterLinksGroupCollection;\r\n};\r\n\r\ntype FooterCollection = {\r\n  items: Footer[];\r\n};\r\n\r\ntype FooterLinksGroup = Entry & {\r\n  groupLink?: ExternalLink | NonNullable\u003cunknown>;\r\n};\r\n\r\ntype FooterLinksGroupCollection = {\r\n  item: FooterLinksGroup;\r\n};\r\n\r\ntype Path = {\r\n  footerCollection: {\r\n    items: {\r\n      [TRANSFORMER]: TransformerReference\u003cFooterTransformer, Footer>;\r\n    };\r\n  };\r\n};\r\n\r\ntype Item = FieldPathValue\u003cQuery, Path>;\r\n\r\ndeclare const x: Item;\r\nconst y: FooterTransformer | undefined = x;\r\n```\r\n\r\n\r\n### 🙁 Actual behavior\r\n\r\n1. Observe that the example gives the following error:\r\n```\r\nTS2322: Type 'Footer[] | undefined' is not assignable to type 'FooterTransformer | undefined'.\r\n  Property 'field' is missing in type 'Footer[]' but required in type 'FooterTransformer'.\r\n\r\n121 const y: FooterTransformer | undefined = x;\r\n          ~\r\n```\r\n\r\n2. Put `type Footer` between `type Query` and `type ExternalLink`. [Updated example](https://www.typescriptlang.org/play?#code/C4TwDgpgBA4gTgQzACwIoBkByB7AdgZQFcAjfCAGwgGNgFjKoBeAKCigB8oBnYOAS1wBzVhygBBOIhAAeHvyGjchcuVGFcAEwgAzARA0A+EZyUrjUdVt259AbmahIsRCgxFSFarXrQWbTvBIaOgA8sQAVl7mElLSga6hEV6Kyqqcljp6hvaO0PHBAGoI5IS+zkEYOAQkZJQ0dAwBLsHutV4NEDngec0YYZE0TFAA3lAA2gDWECAAXNy8AoIAunP5GEUl0AC+9sxUeDxQACoASmKY+ABiIScAsgCiJ0P4IAC2xNjkABQA5KfnVxuDxOPwAlLsBMAIHBtAgqNBWp56j5LnwKBouG0aHw8CEwMAcbguCMRGN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Jyqnsl9yoXiEpKLeayPvFMSXvDl1tNvZ7PcDoAIExcPA2CEGAY8D3gQ+XGvG+4FvO97wfE94FPGtOPcZ5wLgxRnxMQwLx3y8iOQm-6JccBsCvGPmva+2Jb7MB2PfFOPc4BgJdJ3dKUJXjV2HrAsYSw75FxPrAt+29AF7w-qXJeWdBAELAG-Iej9ZIv3IG-UQwlpoN3PvnZu0C0GyTwZffe-cb72yYivVSEBXhzBwZwze+Dd5gCwXhE2AiRDd1Hrw8BuA5grzYEIlBajRbQQBKhE4LlDKMw5B5bkvIxHQgzjzDh0JwytSgWwKBUCi4AElkFDC1pdYo1027QhAMKMmuwWwxjjAcRMeo5huOEfYDsiZZg2LgFY3i6RNCZBsBoIYep7BAA)\r\n\r\n3. Watch the error disappear.\r\n\r\n### 🙂 Expected behavior\r\n\r\nVersions 4.9.5 an below correctly infer the types (produce no error). Changes to the order of `type` declarations do not affect the result.\r\n\r\n### Additional information about the issue\r\n\r\n_No response_","author":{"url":"https://github.com/SimpleCreations","@type":"Person","name":"SimpleCreations"},"datePublished":"2023-09-07T13:30:46Z","url":"https://github.com/microsoft/TypeScript/issues/55666"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d01387b7-c572-7724-f901-619e22b7edac
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC028:6365:23563CB:2F2E27E:6B019765
html-safe-nonceb1c547a68910c5102b001366db3ec6c2a0391c96dd61c28655329f3c5a4757cd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDI4OjYzNjU6MjM1NjNDQjoyRjJFMjdFOjZCMDE5NzY1IiwidmlzaXRvcl9pZCI6IjM2NTA0Nzc3MDgwODY5NzQzMDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacce1b595187d9150df2eef0ad1c3bf5a8d20aa9775e957d8ed09624ddc88adff8
hovercard-subject-tagissue:1885905633
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/55666/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b374b0072ad871fa11186df7dfa4ed85ba16a6531dba1ea848c6ff76a770aa09/microsoft/TypeScript/issues/55666
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b374b0072ad871fa11186df7dfa4ed85ba16a6531dba1ea848c6ff76a770aa09/microsoft/TypeScript/issues/55666
og:image:alt🔎 Search Terms N/A — not sure which part of the playground code causes the issue 🕗 Version & Regression Information No bug on 4.9.5 The bug can be observed starting from 5.0.4 ⏯ Playground Link htt...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSimpleCreations
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/55666#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F55666
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F55666
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/55666
Reloadhttps://github.com/microsoft/TypeScript/issues/55666
Reloadhttps://github.com/microsoft/TypeScript/issues/55666
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/55666
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/55666
Inconsistent type inference when changing the order of type declarations (5.0 regression)https://github.com/microsoft/TypeScript/issues/55666#top
https://github.com/ahejlsberg
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
https://github.com/SimpleCreations
SimpleCreationshttps://github.com/SimpleCreations
on Sep 7, 2023https://github.com/microsoft/TypeScript/issues/55666#issue-1885905633
https://www.typescriptlang.org/play?#code/C4TwDgpgBA4gTgQzACwIoBkByB7AdgZQFcAjfCAGwgGNgFjKoBeAKCigB8oBnYOAS1wBzVhygBBOIhAAeHvyGjchcuVGFcAEwgAzARA0A+EZyUrjUdVt259AbmahIsRCgxFSFarXrQWbTvBIaOgA8sQAVl7mElLSga6hEV6Kyqqcljp6hvaO0PHBAGoI5IS+zkEYOAQkZJQ0dAwBLsHutV4NEPYA9F1QEFzkAsAAtBp8XB3DNgAeI4M2UAACuVxU-GAj-fPAXVR4XOPAELgjAlrT+sPYSTTDPCCUADTL4P1rfBvDW0O7+4fHI1yo0yuD4wD4+wcr3KCTCkRoTCgAG8oABtADWEBAAC5uLwBIIALq4-IYIolaAAX3szD2uB4UAAKgAlMSYfAAMRCzIAsgBRZmI-AgAC2xGw5AAFAByFlsznc-nM6UAShpQwgcG0CCo0FannqPg5fAoGi4bRoENwIQ2Vq4yJEqLl7K5vIFhIA-LjGYh6dpsHARZrmTpNcdddJrvDgI8YcE4V4DPZKcwoU5jabzQbwXgbTn6dJGQZEYy+rNjma424atmOiIPVB9XVvJQM+QzRb83m7SJcVVMKkOtJ1OjcNgAO64JOprRUcgIODQOkM50Kt3MgD6zL5HIFfMwAGE+RvGQBNAAKfNx6j4AEdStxReLyPZZ-PF1Bl8AmayXYqBVuO57oex6rq6SrXqC97QFwT4SvYGpajq0A+ggfoBkGcAhtoYa4BGIiMqh6GBpqZZHJo9pRl4jwEYy0IQOWFFVok0Y0cWSKOmB-6btuu7biBJ4XnyxJMnRkD2GwTq-muSqAXx+5Hie0nge63pEVw-okXAyaprkUAAKq4OOLhNu0PiFmRFb2qS6CmYalDFowTKWUxMQIDIIgCDhcBQAU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l0w5ccF2gWl+sO9luVHIj7U7VTOtHIVSz+RdQfk0rECrerWyTI7Xsu9JskLqd2DYLJDNYclUC6OistzbgOEnVA9wyXAIDWyIU5cBNuBTdGomzfLQW7HhqClGXFdsMyafQnmnzmoSdJyqnsl9yoXiEpKLeayPvFMSXvDl1tNvZ7PcDoAIExcPA2CEGAY8D3gQ+XGvG+4FvO97wfE94FPGtOPcZ5wLgxRnxMQwLx3y8iOQm-6JccBsCvGPmva+2Jb7MB2PfFOPc4BgJdJ3dKUJXjV2HrAsYSw75FxPrAt+29AF7w-qXJeWdBAELAG-Iej9ZIv3IG-UQwlpoN3PvnZu0C0GyTwZffe-cb72yYivVSEBXhzBwZwze+Dd5gCwXhE2AiRDd1Hrw8BuA5grzYEIlBajRbQQBKhE4LlDKMw5B5bkvIxHQgzjzDh0JwytSgWwKBUCi4AElkFDC1pdYo1027QhAMKMmuwWwxjjAcRMeo5huOEfYDsiZZg2LgFY3i6RNCZBsBoIYep7BAA
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Sep 11, 2023https://github.com/microsoft/TypeScript/issues/55666#issuecomment-1714334270
3099385https://github.com/microsoft/TypeScript/commit/30993855fd418a116ad92e821f7b6d4e52a3ca60
https://github.com/andrewbranch
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Sep 11, 2023https://github.com/microsoft/TypeScript/issues/55666#issuecomment-1714346518
#52392https://github.com/microsoft/TypeScript/pull/52392
Andrew Branch (andrewbranch)https://github.com/andrewbranch
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Sep 11, 2023https://github.com/microsoft/TypeScript/issues/55666#event-10337344678
Andrew Branch (andrewbranch)https://github.com/andrewbranch
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Sep 11, 2023https://github.com/microsoft/TypeScript/issues/55666#event-10337345334
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on May 29, 2024https://github.com/microsoft/TypeScript/issues/55666#issuecomment-2138351116
#56291https://github.com/microsoft/TypeScript/issues/56291
#56291https://github.com/microsoft/TypeScript/issues/56291
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on May 29, 2024https://github.com/microsoft/TypeScript/issues/55666#event-12977861637
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Jun 1, 2024https://github.com/microsoft/TypeScript/issues/55666#issuecomment-2143200660
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
not plannedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jun 1, 2024https://github.com/microsoft/TypeScript/issues/55666#event-13007442016
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/55666
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/55666
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.