import { Fn, IntersectionFn, Pipe, SetOptionalFn, ToSchema } from "../types/Fn"; import { Hoc } from "../types/Hoc"; interface WithDefaultsFn extends Fn { return: Pipe, SetOptionalFn ]>; } type WithDefaultsHoc = >(map: Map) => Hoc<[WithDefaultsFn>]>; /** * adds default values to many props, so they can still receive values but they now have a default * @see {@link withDefault} {@link withFactory} {@link withOverrides} {@link withOverride} * @example * function Card({ content, icon, border }: { * content: string; * icon: "star" | "heart" | ...; * border: "none" | "dashed" | ... * }) { * return <>... * } * const StandardCard = withDefaults({icon: "star", border: "rounded"})(Card); * * * // is equivalent to * * * // but * * // is equivalent to * // it propagates the new value */ export declare const withDefaults: WithDefaultsHoc; export {}; //# sourceMappingURL=withDefaults.d.ts.map