Is this the right way to write a type that can only take 2 strings? Like a typescript union.
type EitherOne = "one" | "two";
const thatOne: EitherOne = "one";
I’m asking because, I didn’t find this easily.
Is that a type annotation?
type either =
| @as("ONE") One
| @as("TWO") Two
let something: either = One
let somethingElse: either = Two