UNPKG

@wix/design-system

Version:

@wix/design-system

14 lines 728 B
/** Accepts Object type and returns a union of its' own property values */ export type ValuesOf<T extends Record<any, string | number>> = T[keyof T]; /** Creates key-value pair object type from provided string union */ export type ConstantOf<T extends string> = Readonly<Record<Uppercase<T>, T>>; /** * This is used for required consumer facing props. Since we cannot trust the consumers to provide all the required props (JS users, automations, etc.), * we need to ensure that undefined values wouldn't break the component. * @returns a union with 'undefined'. * */ export type SafeRequired<T> = T | undefined; export type Prettify<T> = { [K in keyof T]: Prettify<T[K]>; } & {}; //# sourceMappingURL=typeUtils.d.ts.map