Skip to content

Type Aliases

Spice supports defining type aliases like this:

Usage

Spice
1
2
3
4
5
6
7
8
9
type I32 alias int;
type I64 alias long;

type T int|long|short;
type TestStruct<T> struct {
    bool f1
    unsigned T f2
}
type TS alias TestStruct<short>;