René's URL Explorer Experiment


Title: Unresolved generic type arguments end up in type declarations since 5.7.2 · Issue #61338 · microsoft/TypeScript · GitHub

Open Graph Title: Unresolved generic type arguments end up in type declarations since 5.7.2 · Issue #61338 · microsoft/TypeScript

X Title: Unresolved generic type arguments end up in type declarations since 5.7.2 · Issue #61338 · microsoft/TypeScript

Description: 🔎 Search Terms unresolved, undefined, declarations 🕗 Version & Regression Information This changed between versions 5.6.3 and 5.7.2 In a project, I have a relatively complex set of generic types to be able to declare some values that get...

Open Graph Description: 🔎 Search Terms unresolved, undefined, declarations 🕗 Version & Regression Information This changed between versions 5.6.3 and 5.7.2 In a project, I have a relatively complex set of generic types to...

X Description: 🔎 Search Terms unresolved, undefined, declarations 🕗 Version & Regression Information This changed between versions 5.6.3 and 5.7.2 In a project, I have a relatively complex set of generic type...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unresolved generic type arguments end up in type declarations since 5.7.2","articleBody":"### 🔎 Search Terms\n\nunresolved, undefined, declarations\n\n### 🕗 Version & Regression Information\n\n- This changed between versions 5.6.3 and 5.7.2\n\nIn a project, I have a relatively complex set of generic types to be able to declare some values that get expanded and merged with defaults at runtime, while exposing that behavior in the type system. This seems to be complex enough that the semantic highlighting in VSCode regularly breaks in that file: https://github.com/zwave-js/zwave-js/blob/133172125d4148ea6e9e92a059b4325862ff6dd7/packages/cc/src/lib/Values.ts\n\nUntil TS 5.6.3, this code\n```ts\nexport const BasicCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses.Basic, {\n\t\t...V.staticProperty(\"currentValue\", {\n\t\t\t...ValueMetadata.ReadOnlyLevel,\n\t\t\tlabel: \"Current value\" as const,\n\t\t}),\n// ...\n});\n```\n\nwould result in a type definition like this:\n```ts\nexport declare const BasicCCValues: Readonly\u003c{\n    currentValue: {\n        readonly id: {\n            commandClass: CommandClasses.Basic;\n            property: \"currentValue\";\n        };\n        readonly endpoint: (endpoint?: number | undefined) => {\n            readonly commandClass: CommandClasses.Basic;\n            readonly endpoint: number;\n            readonly property: \"currentValue\";\n        };\n        readonly is: (valueId: ValueID) => boolean;\n        readonly meta: {\n            readonly label: \"Current value\";\n            readonly writeable: false;\n            readonly max: 99;\n            readonly min: 0;\n            readonly type: \"number\";\n            readonly readable: true;\n        };\n        readonly options: {\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        };\n    };\n}>;\n```\n\nSince 5.7.2, this is what gets generated. Note that `ValueIDBase` and `TBlueprint` are generics type arguments used in the transformation that aren't defined in the output file, so the entire types of the `meta` and `options` properties effectively resolve to `any`. It seems that somewhere along the line, TS just gives up resolving:\n```ts\nexport declare const BasicCCValues: Readonly\u003c{\n    currentValue: {\n        readonly id: ValueIDBase;\n        readonly endpoint: (endpoint?: number | undefined) => {\n            readonly commandClass: CommandClasses.Basic;\n            readonly endpoint: number;\n            readonly property: \"currentValue\";\n        };\n        readonly is: (valueId: ValueID) => boolean;\n        readonly meta: Readonly\u003c(ValueMetadata extends NonNullable\u003cTBlueprint[\"meta\"]> ? Readonly\u003c{\n            readonly type: \"any\";\n            readonly readable: true;\n            readonly writeable: true;\n        }> : import(\"alcalzone-shared/types\").Simplify\u003cimport(\"alcalzone-shared/types\").Omit\u003cReadonly\u003c{\n            readonly type: \"any\";\n            readonly readable: true;\n            readonly writeable: true;\n        }>, (\"type\" | \"readable\" | \"writeable\") & keyof NonNullable\u003cTBlueprint[\"meta\"]>> & TBlueprint[\"meta\"]>) extends infer T ? { [K in keyof T as [undefined] extends [(ValueMetadata extends NonNullable\u003cTBlueprint[\"meta\"]> ? Readonly\u003c{\n            readonly type: \"any\";\n            readonly readable: true;\n            readonly writeable: true;\n        }> : import(\"alcalzone-shared/types\").Simplify\u003cimport(\"alcalzone-shared/types\").Omit\u003cReadonly\u003c{\n            readonly type: \"any\";\n            readonly readable: true;\n            readonly writeable: true;\n        }>, (\"type\" | \"readable\" | \"writeable\") & keyof NonNullable\u003cTBlueprint[\"meta\"]>> & TBlueprint[\"meta\"]>)[K]] ? never : K]: (ValueMetadata extends NonNullable\u003cTBlueprint[\"meta\"]> ? Readonly\u003c{\n            readonly type: \"any\";\n            readonly readable: true;\n            readonly writeable: true;\n        }> : import(\"alcalzone-shared/types\").Simplify\u003cimport(\"alcalzone-shared/types\").Omit\u003cReadonly\u003c{\n            readonly type: \"any\";\n            readonly readable: true;\n            readonly writeable: true;\n        }>, (\"type\" | \"readable\" | \"writeable\") & keyof NonNullable\u003cTBlueprint[\"meta\"]>> & TBlueprint[\"meta\"]>)[K]; } : never>;\n        readonly options: Readonly\u003c(import(\"@zwave-js/cc\").CCValueOptions extends NonNullable\u003cTBlueprint[\"options\"]> ? {\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        } : import(\"alcalzone-shared/types\").Simplify\u003cimport(\"alcalzone-shared/types\").Omit\u003c{\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        }, (\"stateful\" | \"secret\" | \"internal\" | \"minVersion\" | \"supportsEndpoints\" | \"autoCreate\") & keyof NonNullable\u003cTBlueprint[\"options\"]>> & TBlueprint[\"options\"]>) extends infer T ? { [K in keyof T as [undefined] extends [(import(\"@zwave-js/cc\").CCValueOptions extends NonNullable\u003cTBlueprint[\"options\"]> ? {\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        } : import(\"alcalzone-shared/types\").Simplify\u003cimport(\"alcalzone-shared/types\").Omit\u003c{\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        }, (\"stateful\" | \"secret\" | \"internal\" | \"minVersion\" | \"supportsEndpoints\" | \"autoCreate\") & keyof NonNullable\u003cTBlueprint[\"options\"]>> & TBlueprint[\"options\"]>)[K]] ? never : K]: (import(\"@zwave-js/cc\").CCValueOptions extends NonNullable\u003cTBlueprint[\"options\"]> ? {\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        } : import(\"alcalzone-shared/types\").Simplify\u003cimport(\"alcalzone-shared/types\").Omit\u003c{\n            readonly internal: false;\n            readonly minVersion: 1;\n            readonly secret: false;\n            readonly stateful: true;\n            readonly supportsEndpoints: true;\n            readonly autoCreate: true;\n        }, (\"stateful\" | \"secret\" | \"internal\" | \"minVersion\" | \"supportsEndpoints\" | \"autoCreate\") & keyof NonNullable\u003cTBlueprint[\"options\"]>> & TBlueprint[\"options\"]>)[K]; } : never>;\n    };\n}>;\n```\n\n### ⏯ Playground Link\n\n_No response_\n\n### 💻 Code\n\n_No response_\n\n### 🙁 Actual behavior\n\nsee above\n\n### 🙂 Expected behavior\n\nsee above\n\n### Additional information about the issue\n\nI found another issue that might be related, but I'm not familiar enough with the details to know:\nhttps://github.com/microsoft/TypeScript/issues/60864","author":{"url":"https://github.com/AlCalzone","@type":"Person","name":"AlCalzone"},"datePublished":"2025-03-03T10:52:20Z","url":"https://github.com/microsoft/TypeScript/issues/61338"}

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:05197c19-56f6-d701-f5dd-2ccba6a2b822
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB6C0:97D39:4F67FB:69125A:6B01CD83
html-safe-nonce673a1696d63bf3c966efa210aac8daa1ee1ebca40bd58f333a4baaf64f6cc884
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkMwOjk3RDM5OjRGNjdGQjo2OTEyNUE6NkIwMUNEODMiLCJ2aXNpdG9yX2lkIjoiMTc2MDI4MjYxNDY0MjY0MDY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0c998c9018ca7d705973fad66e06db179b65b7db5bd75ddd544efeaa709369aa
hovercard-subject-tagissue:2890883049
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/61338/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e1d1ab07a5d5605757b80660162889bb4d64bae38fd8a0d901316283467630be/microsoft/TypeScript/issues/61338
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e1d1ab07a5d5605757b80660162889bb4d64bae38fd8a0d901316283467630be/microsoft/TypeScript/issues/61338
og:image:alt🔎 Search Terms unresolved, undefined, declarations 🕗 Version & Regression Information This changed between versions 5.6.3 and 5.7.2 In a project, I have a relatively complex set of generic types to...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAlCalzone
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/61338#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F61338
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%2F61338
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/61338
Reloadhttps://github.com/microsoft/TypeScript/issues/61338
Reloadhttps://github.com/microsoft/TypeScript/issues/61338
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/61338
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/61338
#61392https://github.com/microsoft/TypeScript/pull/61392
Unresolved generic type arguments end up in type declarations since 5.7.2https://github.com/microsoft/TypeScript/issues/61338#top
#61392https://github.com/microsoft/TypeScript/pull/61392
https://github.com/AlCalzone
AlCalzonehttps://github.com/AlCalzone
on Mar 3, 2025https://github.com/microsoft/TypeScript/issues/61338#issue-2890883049
https://github.com/zwave-js/zwave-js/blob/133172125d4148ea6e9e92a059b4325862ff6dd7/packages/cc/src/lib/Values.tshttps://github.com/zwave-js/zwave-js/blob/133172125d4148ea6e9e92a059b4325862ff6dd7/packages/cc/src/lib/Values.ts
#60864https://github.com/microsoft/TypeScript/issues/60864
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Mar 4, 2025https://github.com/microsoft/TypeScript/issues/61338#issuecomment-2696515587
https://www.npmjs.com/package/every-tshttps://www.npmjs.com/package/every-ts
https://github.com/AlCalzone
AlCalzonehttps://github.com/AlCalzone
on Mar 4, 2025https://github.com/microsoft/TypeScript/issues/61338#issuecomment-2697337083
476e9eehttps://github.com/microsoft/TypeScript/commit/476e9ee201bd19afbc359ffe93b32a0ccd97152a
#59282https://github.com/microsoft/TypeScript/pull/59282
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Mar 4, 2025https://github.com/microsoft/TypeScript/issues/61338#issuecomment-2697971916
Titian Cernicova-Dragomir (@dragomirtitian)https://github.com/dragomirtitian
https://github.com/dragomirtitian
Titian Cernicova-Dragomir (dragomirtitian)https://github.com/dragomirtitian
on Mar 5, 2025https://github.com/microsoft/TypeScript/issues/61338#issuecomment-2701090429
Playground Linkhttps://www.typescriptlang.org/play/#code/FAMwrgdgxgLglgewgAgO4CcCGAHbBTdAHgBUA+ACgDdMAbMPALmWIEpkBvYZb5dPGMOhSceo5AHN+E8m3a9+glNTp4A3MgC+AGi48NwfcDwAPbAnQxkUJAGdLqZAF40WXAXIAGDSyA
Wesley Wigham (weswigham)https://github.com/weswigham
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#61392https://github.com/microsoft/TypeScript/pull/61392
on Mar 14, 2025https://github.com/microsoft/TypeScript/issues/61338#event-16779772135
microsofthttps://github.com/microsoft
on Oct 22, 2025https://github.com/microsoft/TypeScript/issues/61338#event-20419705692
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/61338
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/61338
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.