René's URL Explorer Experiment


Title: 7.0 regression: expando property on a function declaration is dropped when a merged namespace exports a type with the same name (TS2339) · Issue #65600 · microsoft/TypeScript · GitHub

Open Graph Title: 7.0 regression: expando property on a function declaration is dropped when a merged namespace exports a type with the same name (TS2339) · Issue #65600 · microsoft/TypeScript

X Title: 7.0 regression: expando property on a function declaration is dropped when a merged namespace exports a type with the same name (TS2339) · Issue #65600 · microsoft/TypeScript

Description: 🔎 Search Terms expando, expando namespace, namespace merge, function namespace merge, property assignment, type-only namespace, TS2339, "does not exist on type", compound component, static property 🕗 Version & Regression Information This...

Open Graph Description: 🔎 Search Terms expando, expando namespace, namespace merge, function namespace merge, property assignment, type-only namespace, TS2339, "does not exist on type", compound component, static property...

X Description: 🔎 Search Terms expando, expando namespace, namespace merge, function namespace merge, property assignment, type-only namespace, TS2339, "does not exist on type", compound component, stati...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"7.0 regression: expando property on a function declaration is dropped when a merged namespace exports a type with the same name (TS2339)","articleBody":"### 🔎 Search Terms\n\nexpando, expando namespace, namespace merge, function namespace merge, property assignment, type-only namespace, TS2339, \"does not exist on type\", compound component, static property\n\n### 🕗 Version & Regression Information\n\n- This changed between versions 6.0.3 and 7.0.2 (still present in 7.1.0-beta and 7.1.0-dev.20261120.1)\n- This changed in commit or PR microsoft/typescript-go#2715 (\"Defer binding of expando assignments and give them lower priority\"). `@typescript/native-preview@7.0.0-dev.20260209.1` has no error, `7.0.0-dev.20260210.1` reports it. #2715 is the only expando-related commit between those two builds.\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/v2/?ts=next#code/v2/N4IghgxgLglgbgUwGIwDYJALhAegO4D2ATgNYDOADpAjlGRAQHYBmMA5gHQBWZTIANCFboyWUPmLkqEGnQYt23XoywhgAAgA6IBgFsKaBEQDyFWEzLbM6jdrJQiMaFfUOArgn5aQUMETYIUC7aCGQATAAMYWHa6gC+8QK4hKSU1DhkRBA4MIwAJggAHhx0qsxujNAwTOrMABQAlDZxmiwcYOoAvOoRANytjGC6odIItTbqRRTEUK4AnhRjHd198a0gcYJkCOhVfJig02Qw5owAwgSobroqmABsYYJHJ9WMADK5CABy1wBGRlgAIxbHYIPaMADKviIUAuVxuWAeIN2pyhfigH0Y3z+AMwgM2IEQRGO+zCcSAA\n\n### 💻 Code\n\n```ts\nfunction f() {}\nf.a = 0;\nnamespace f { export type a = 0; }\n```\n\nReal-world shape (this is how Mantine declares its compound components, e.g. `Popover.Target` with a `Popover.Target.Props` type):\n\n```ts\nexport function Popover() { return null; }\nPopover.Target = (x: number) => x;\nPopover.displayName = \"Popover\";\n\nexport namespace Popover {\n  export namespace Target {\n    export type Props = number;\n  }\n}\n\nPopover.Target(1);\nPopover.displayName;\n```\n\n### 🙁 Actual behavior\n\n7.0.2, 7.1.0-beta and 7.1.0-dev.20261120.1:\n\n```\nmin.ts(2,3): error TS2339: Property 'a' does not exist on type '() => void'.\n```\n\n```\nrepro.ts(2,9): error TS2339: Property 'Target' does not exist on type '{ (): null; displayName: string; }'.\nrepro.ts(11,9): error TS2339: Property 'Target' does not exist on type '{ (): null; displayName: string; }'.\n```\n\nThe value property `a` (or `Target`) is removed from the function's type because the merged namespace has a type-only export with the same name. `displayName`, which has no namespace counterpart, is kept.\n\n### 🙂 Expected behavior\n\nNo error, as in 6.0.3. The namespace member is type-only (a type alias, an interface, or a namespace that contains only types), so it does not declare a value named `a`. The expando assignment is the only value declaration for that name and should still create the property. In 6.0.3, `f.a` is typed as `number` (`const s: string = f.a` reports TS2322 \"Type 'number' is not assignable to type 'string'\").\n\n### Additional information about the issue\n\nFrom reading the binder, an expando is now declared only when the name has no existing non-expando declaration:\n\n```go\n// tsc/internal/binder/binder.go\n// We declare expandos only when there are no non-expando declarations for that name.\nif existing := exports.Get(b.getDeclarationName(node)); existing == nil || existing.Flags()&ast.SymbolFlagsAssignment != 0 {\n```\n\nThis check does not appear to consider whether the existing declaration has a value meaning, so a type alias, an interface or an uninstantiated namespace also suppresses the property. #2715 was prompted by a value conflict (microsoft/typescript-go#2653: a `declare class` static member plus an expando assignment).\n\nResults by variant, each file ending with `const n: number = f.a;` (`--strict --noEmit --target es2022`):\n\n| Variant | 6.0.3 | 7.0.2 |\n| --- | --- | --- |\n| `export type a` in the namespace (minimal repro) | no error | TS2339 |\n| `export interface a {}` in the namespace | no error | TS2339 |\n| `export namespace a {}` (empty) | no error | TS2339 |\n| `export namespace a` containing only types | no error | TS2339 |\n| namespace declared before the function | no error | TS2339 |\n| non-exported `type a` in the namespace | no error | no error |\n| namespace without a member named `a` | no error | no error |\n| no namespace at all | no error | no error |\n| `const f = () => {}` instead of `function f() {}` | no error | no error |\n| property declared in the type (`declare const f: { (): void; a: number }`) | no error | no error |\n| namespace member `a` also contains a value (`export const kind = 0`) | TS2300 Duplicate identifier | TS2322 (different errors, both reject the code) |","author":{"url":"https://github.com/MartinFerret","@type":"Person","name":"MartinFerret"},"datePublished":"2026-11-20T09:52:39Z","url":"https://github.com/microsoft/TypeScript/issues/65600"}

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:5dd1088a-947c-babd-c896-7f75de69c654
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE8B0:3F8AB1:9F8709:CEA8E7:6B00E10F
html-safe-nonce2caf8d4f67a55a6e280262e2d66d5cfc428d9c75bb387c49f6ac8bb09e8f178f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEIwOjNGOEFCMTo5Rjg3MDk6Q0VBOEU3OjZCMDBFMTBGIiwidmlzaXRvcl9pZCI6IjczOTI3Mzg4NDgzMTQyODYzNTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2ec703d05ba5f00de289508c08f380b22896f46662bb251c30158c537f7cfbc4
hovercard-subject-tagissue:6509039993
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/65600/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d9d53bfedfbdc4523f78ac1dce2ae62d8b1337e56e777969ec5dfed38d22228/microsoft/TypeScript/issues/65600
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d9d53bfedfbdc4523f78ac1dce2ae62d8b1337e56e777969ec5dfed38d22228/microsoft/TypeScript/issues/65600
og:image:alt🔎 Search Terms expando, expando namespace, namespace merge, function namespace merge, property assignment, type-only namespace, TS2339, "does not exist on type", compound component, static property...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMartinFerret
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
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
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/65600#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F65600
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%2F65600
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/65600
Reloadhttps://github.com/microsoft/TypeScript/issues/65600
Reloadhttps://github.com/microsoft/TypeScript/issues/65600
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)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/65600
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65600
#65603https://github.com/microsoft/TypeScript/pull/65603
7.0 regression: expando property on a function declaration is dropped when a merged namespace exports a type with the same name (TS2339)https://github.com/microsoft/TypeScript/issues/65600#top
#65603https://github.com/microsoft/TypeScript/pull/65603
https://github.com/RyanCavanaugh
https://github.com/copilot-swe-agent
https://github.com/MartinFerret
Martin Ferret (MartinFerret)https://github.com/MartinFerret
on Nov 20, 2026https://github.com/microsoft/TypeScript/issues/65600#issue-6509039993
Defer binding of expando assignments and give them lower priority typescript-go#2715https://github.com/microsoft/typescript-go/pull/2715
What do we call this command-line option? #2715https://github.com/microsoft/TypeScript/issues/2715
https://www.typescriptlang.org/play/v2/?ts=next#code/v2/N4IghgxgLglgbgUwGIwDYJALhAegO4D2ATgNYDOADpAjlGRAQHYBmMA5gHQBWZTIANCFboyWUPmLkqEGnQYt23XoywhgAAgA6IBgFsKaBEQDyFWEzLbM6jdrJQiMaFfUOArgn5aQUMETYIUC7aCGQATAAMYWHa6gC+8QK4hKSU1DhkRBA4MIwAJggAHhx0qsxujNAwTOrMABQAlDZxmiwcYOoAvOoRANytjGC6odIItTbqRRTEUK4AnhRjHd198a0gcYJkCOhVfJig02Qw5owAwgSobroqmABsYYJHJ9WMADK5CABy1wBGRlgAIxbHYIPaMADKviIUAuVxuWAeIN2pyhfigH0Y3z+AMwgM2IEQRGO+zCcSAAhttps://www.typescriptlang.org/play/v2/?ts=next#code/v2/N4IghgxgLglgbgUwGIwDYJALhAegO4D2ATgNYDOADpAjlGRAQHYBmMA5gHQBWZTIANCFboyWUPmLkqEGnQYt23XoywhgAAgA6IBgFsKaBEQDyFWEzLbM6jdrJQiMaFfUOArgn5aQUMETYIUC7aCGQATAAMYWHa6gC+8QK4hKSU1DhkRBA4MIwAJggAHhx0qsxujNAwTOrMABQAlDZxmiwcYOoAvOoRANytjGC6odIItTbqRRTEUK4AnhRjHd198a0gcYJkCOhVfJig02Qw5owAwgSobroqmABsYYJHJ9WMADK5CABy1wBGRlgAIxbHYIPaMADKviIUAuVxuWAeIN2pyhfigH0Y3z+AMwgM2IEQRGO+zCcSAA
#2715https://github.com/microsoft/TypeScript/issues/2715
microsoft/typescript-go#2653https://github.com/microsoft/typescript-go/issues/2653
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Copilothttps://github.com/apps/copilot-swe-agent
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Nov 20, 2026https://github.com/microsoft/TypeScript/issues/65600#event-36788349327
Copilothttps://github.com/apps/copilot-swe-agent
Allow expando assignments to merge with same-named type-only namespace members #65603https://github.com/microsoft/TypeScript/pull/65603
on Nov 20, 2026https://github.com/microsoft/TypeScript/issues/65600#event-36788385091
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/65600
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65600
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Copilothttps://github.com/apps/copilot-swe-agent
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.