import * as React from 'react'; // disable automatic export export {}; /** * `T extends ConsistentWith` means that where `T` has overlapping properties with * `U`, their value types do not conflict. * * @internal */ export type ConsistentWith = { [P in keyof DecorationTargetProps]: P extends keyof InjectedProps ? InjectedProps[P] extends DecorationTargetProps[P] ? DecorationTargetProps[P] : InjectedProps[P] : DecorationTargetProps[P]; }; /** * a function that takes {component} and returns a component that passes along * all the props to {component} except the {InjectedProps} and will accept * additional {AdditionalProps} */ export type PropInjector = < C extends React.ComponentType, InjectedProps>> >( component: C ) => React.ComponentType< Omit>, keyof InjectedProps> & AdditionalProps >; /** * Remove properties `K` from `T`. * * @internal */ export type Omit = T extends any ? Pick> : never; /** * Generate a set of string literal types with the given default record `T` and * override record `U`. * * If the property value was `true`, the property key will be added to the * string union. * * @internal */ export type OverridableStringUnion = GenerateStringUnion>; /** * Like `T & U`, but using the value types from `U` where their properties overlap. * * @internal */ export type Overwrite = Omit & U; type GenerateStringUnion = Extract< { [Key in keyof T]: true extends T[Key] ? Key : never; }[keyof T], string >;