Skip to content

feat: add type alias code generation#55

Merged
klaidliadon merged 2 commits intomasterfrom
feat/type-alias
Mar 30, 2026
Merged

feat: add type alias code generation#55
klaidliadon merged 2 commits intomasterfrom
feat/type-alias

Conversation

@klaidliadon
Copy link
Copy Markdown
Contributor

Summary

  • Add alias block to types.go.tmpl that emits export type AliasName = <resolved TS type>
  • Uses existing type template to render the underlying base type
  • Add Username: string and Age: uint32 alias examples to node-ts/service.ridl

Release order

Depends on webrpc v0.37.0 (webrpc/webrpc#439). Must update go.mod to pin to the release tag before merging.

  1. webrpc v0.37.0 ← merge and tag first
  2. gen-golang v0.28.0
  3. gen-typescript v0.26.0 ← this PR
  4. ridl-lsp v1.1.0
  5. ridl-vscode v0.0.2

Test plan

  • Update go.mod to webrpc@v0.37.0 after upstream tag
  • Regenerate examples and verify export type Username = string output

Generates `export type AliasName = TSType` for alias types defined in
RIDL. Aliases used as field or argument types are rendered by name.
Update CI to use feat/type-alias branch of webrpc for alias support.
Add version stripping to examples Makefile to avoid git conflicts.
@klaidliadon klaidliadon merged commit 80f530e into master Mar 30, 2026
1 check passed
@klaidliadon klaidliadon deleted the feat/type-alias branch March 30, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant