I'm trying to create an exhaustive typecheck for an array from a type alias.
type Elevation = '1' | '2' | '3';
type SomeExhaustiveType = ???
const elevationArray: SomeExhaustiveType<Elevation>[] = ['1', '2']; // <-- show error here because 3 is not in the array
Is it possible to check if all members of type Elevation
are in elevationArray
?