Skip to content

feat: add type alias support#10

Merged
pkieltyka merged 1 commit intomasterfrom
feat/type-alias
Mar 31, 2026
Merged

feat: add type alias support#10
pkieltyka merged 1 commit intomasterfrom
feat/type-alias

Conversation

@klaidliadon
Copy link
Copy Markdown
Contributor

Adds type alias rendering as JS comments. Since JS has no type system, aliases are emitted as `// type Name = BaseType` comments in the generated output.

Changes

  • `types.go.tmpl`: Added `isAliasType` check block between enum and struct sections
  • `_examples/hello-webrpc/hello-api.ridl`: Added `Username` and `Age` alias examples
  • `_examples/hello-webrpc/webapp/client.gen.js`: Regenerated with alias comments

Generated output example

```js
// type Username = string
// type Age = uint32
```

@pkieltyka pkieltyka merged commit 112f40e into master Mar 31, 2026
1 check passed
@pkieltyka pkieltyka deleted the feat/type-alias branch March 31, 2026 00:11
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.

2 participants