Skip to content

Fix ProxyGenerator missing types when referenced only as dictionary value types#2193

Merged
einari merged 1 commit into
mainfrom
fix/proxy-generator-collect-dictionary-value-types
May 4, 2026
Merged

Fix ProxyGenerator missing types when referenced only as dictionary value types#2193
einari merged 1 commit into
mainfrom
fix/proxy-generator-collect-dictionary-value-types

Conversation

@einari
Copy link
Copy Markdown
Contributor

@einari einari commented May 4, 2026

Fixed

  • Types used exclusively as dictionary value types (e.g. IDictionary<EventType, FromDefinition>) were not collected into typesInvolved and therefore had no TypeScript generated for them. They instead appeared as self-referential imports in the combined output file. CollectTypesInvolved now recurses into dictionary value types in all three overloads (for Type, PropertyDescriptor, and RequestParameterDescriptor).

…peDescriptors generated

IsKnownType() returns true for IDictionary<K,V>, which caused CollectTypesInvolved
to skip dictionary properties entirely — never collecting the value types
(e.g. FromDefinition, JoinDefinition, ProjectionChildrenDefinition) into the
global typesInvolved list. These types therefore had no TypeDescriptors generated
and appeared as self-referential imports instead of inline class definitions.

Mirror the dictionary value type collection already present in ToTypeDescriptor
into all three CollectTypesInvolved overloads: for PropertyDescriptor, for
RequestParameterDescriptor, and for Type. When a property is a dictionary, recurse
into the value type while still skipping the dictionary type itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@einari einari added the patch label May 4, 2026
@einari einari merged commit 7d75b92 into main May 4, 2026
50 checks passed
@einari einari deleted the fix/proxy-generator-collect-dictionary-value-types branch May 4, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant