Repository navigation
feat: real type Foo = Bar generated for a schema's type alias - #35
Merged
Merged
Conversation
added 2 commits
October 3, 2026 22:14
comline-core reworked how `type` aliases freeze (ComlineProject/core#55): each now freezes to its own named FrozenUnit::TypeAlias, same as a struct/enum declaration, instead of being substituted away. Both generators pick this up (ComlineProject/comline-rust#16, ComlineProject/comline-typescript#14) - a schema's `type UserId = u64` now produces a real `pub type UserId = u64;` / `export type UserId = number;`, with fields that use the alias referencing it by name instead of the resolved primitive. Bumps all four pins in lockstep, in dependency order (generation first, since the two per-language codegens consume its types).
Slipped through in the --version feature (#34) - this repo's CI runs cargo fmt --check, caught here when it ran on this PR's otherwise- unrelated branch.
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
comline-corereworked howtypealiases freeze (ComlineProject/core#55): each now freezes to its own namedFrozenUnit::TypeAlias, same as a struct/enum declaration, instead of being substituted away. Both generators pick this up (ComlineProject/comline-rust#16, ComlineProject/comline-typescript#14) — a schema'stype UserId = u64now produces a realpub type UserId = u64;/export type UserId = number;, with fields that use the alias referencing it by name instead of the resolved primitive.Bumps all four pins in lockstep, in dependency order (generation first).
Test plan
cargo build/cargo test— clean (46 tests), single consistentcomline_codegen/comline_coreinstance in the graphtype Lang = Language, never referenced — exactly the user-reported case) and a used one (type UserId = u64; struct Greeting { sender: UserId }), generated for bothrustandtypescript— both declarations and the by-name field reference appear correctly in both languages