/** * Like `Extract`, but ensures that the extracted type is a strict subtype of the input type. */ export type ExtractStrict = Extract; export type MaybeAllValuesShorthandProperty = T | `${T} ${T}` | `${T} ${T} ${T}` | `${T} ${T} ${T} ${T}`; export type MaybeTwoValuesShorthandProperty = T | `${T} ${T}`; /** * Prevents widening string literal types in a union to `string`. * @example * type PropName = 'foo' | 'bar' | string * // ^? string * type PropName = 'foo' | 'bar' | (string & {}) * // ^? 'foo' | 'bar' | (string & {}) */ export type AnyString = string & {};