Closed
Description
in case that:
// Lib.resi
@gentype
@tag("action")
type action =
| @as("insert") Insert({data: string})
| @as("retain") Retain({data: string})
| @as("remove") Remove({data: string})
the generated .ts by gentype are:
// Lib.gen.ts
export type action =
{ TAG: "insert"; readonly data: string }
| { TAG: "retain"; readonly data: string }
| { TAG: "remove"; readonly data: string };
the discriminator property name is still TAG
not action
Metadata
Metadata
Assignees
Labels
No labels