GetEnumFrom: TEnum[keyof TEnum] | keyof TEnum

Returns the allowed input for an enum.

Type Parameters

enum Direction { Left, Right };
type DirectionInput = GetEnumFrom<Direction>; // "Left" | "Right" | 0 | 1