Lyricdev
GitHub

LYR-PAR0028

a type alias without '='

error ยท spec 03-types

A type or opaque type declaration names the alias, and its type parameters, but no = follows.

Explanation

A type alias is written type Name = T;: the name, =, and the type it stands for.

Write = between the name and the type.

Wrong

type Id int;

fn main(): void {
}
type Id = int;

fn main(): void {
    let id: Id = 1;
    let _ = id;
}