import { Call, Fn, KeepNeversFn, OmitFn } from "../types/Fn"; import { Hoc } from "../types/Hoc"; interface WithOmitFn extends Fn { return: Call>, { [K in Extract[0]]: [ K, K extends OmitNames ? undefined extends Extract[1] ? Extract[1] : never : Extract[1] ]; }[Extract[0]]>; } type WithOmitHoc = (omitNames: OmitNames[]) => Hoc<[WithOmitFn]>; /** * Omit, which is actually ignore mentioned props * * @see {@link withPick} * @example * const user = { * username: "Some username", * password: "s0m3 p4ssw0rd", * vitalSecretInfo: "..." * }; * function RevealInfo( * { username, password, vitalSecretInfo }: * { username: string; password?: string; vitalSecretInfo: string } * ) { * ... * } * const SafeRevealInfo = withOmit(["password"])(RevealInfo); * * // is equivalent to * // password is not included, but you can still see vitalSecretInfo */ export declare const withOmit: WithOmitHoc; export {}; //# sourceMappingURL=withOmit.d.ts.map