GetEnumTo: TEnum[keyof TEnum]

Returns all the available variants of an enum.

Type Parameters

enum Direction { Left, Right };
type DirectionOutput = GetEnumTo<Direction>; // 0 | 1