type DeepPartial = { [P in keyof T]?: DeepPartial; }; /** Uses a union as optional keys for a Record */ type PartialRecord = { [P in K]?: T; }; /** * Make all properties in T nullable */ type Nullable = { [P in keyof T]: T[P] | null; }; /** Makes all possible combination for a CSS prop to accept 1 to 4 values */ type CSSShorthandValue = `${Value}` | `${Value} ${Value}` | `${Value} ${Value} ${Value}` | `${Value} ${Value} ${Value} ${Value}`; /** * Generates a type which contains HTML attributes for the given element * excluding attributes which are defined in Props. * The "dir" prop is forced to the given value because InstUI accepts only * these. * * @example * class Button extends React.Component>> {} */ type OtherHTMLAttributes = React.AllHTMLAttributes> = Omit & { dir?: 'ltr' | 'rtl'; }; /** * These props are not the components own prop, but we have to allow them, * since these are passed to another component. */ type PickPropsWithExceptions, ExcludedProps extends keyof TargetProps> = Omit; export type { DeepPartial, PartialRecord, Nullable, CSSShorthandValue, OtherHTMLAttributes, PickPropsWithExceptions }; //# sourceMappingURL=UtilityTypes.d.ts.map