Skip to content

Alias types

Compare
Choose a tag to compare
@pkedy pkedy released this 22 May 20:35
· 6 commits to main since this release

Alias syntax:

alias UUID = bytes

Aliases are similar to (and inspired by) Scalar types from GraphQL, but the difference is that Aliases target a primitive or user-defined type. The intention is mainly to help the a code generation module redirect an aliased type to an alternate type that is treated a specific way. For example, the alias of UUID = bytes might indicate that a byte array that should be treated as a UUID (16 bytes). The code generator would select the ideal internal type for its targeted programming language.