Repository navigation
Generate inheriting and union types as classes under Pascal paths - #28
Merged
Merged
Conversation
C# cannot omit inherited members, so a child extends its parent only when it still covers every parent field. Unions emit the composed properties after remove_fields, and generated types land in Types/Generated with Pascal file names. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
remove_fieldsthat drops a parent member emits a flat class so those properties stay gone.set,dictionary, andfileare not bases, andStandardDataSourceis no longer emitted.remove_fields. Validators include the parent validator and rules for the fields the child declares.Types/Generated/DatasourceandTypes/Generated/Views(validators nested underneath), with Pascal file and directory names from the shared casing default.Test plan
node --experimental-strip-types --test test/*.test.ts src/common/default-casing.test.ts src/import-generator.test.ts(84 passing)18cd03e) so Auto casing resolves to PascalMade with Cursor