-
Notifications
You must be signed in to change notification settings - Fork 248
Closed
Description
I'd find it useful to be able to provide 'kind' string literal (see discriminated unions: https://www.typescriptlang.org/docs/handbook/advanced-types.html)
Example:
interface SquareDto {
kind: "SQUARE";
size: number;
}
interface CircleDto {
kind: "CIRCLE";
radius: number;
}
It would be possible to define public final String kind = "CIRCLE";
or maybe even public final ShapeKind kind = ShapeKind.CIRCLE;
on dto.
Currently that gets emitted as kind: string;
or kind: ShapeKind
in typescript.
What do you think?
Thanks
Metadata
Metadata
Assignees
Labels
No labels