type UnUnion = T extends S ? ([S] extends [T] ? T : never) : never; type NotUnion = UnUnion; /** * Literal requires that the given type is a literal value, and not a union of literals. */ export type Literal = OfType extends Value ? never : NotUnion; /** Value must be a single string literal */ export type StringLiteral = Literal; export {};