import type { PartialDeep } from 'type-fest'; declare type DeepPartial = PartialDeep; export interface CleanOptions { /** * Skip over and do not clean empty values. A value is considered empty if * it's a falsey value, an empty object (`{}`), or an empty array (`[]`). * * Use this option when you only want to remove properties specified by the * `target` option. This can be useful when you want to discard certain values * but retain the overall shape of the original object. * * @example * ``` * > const user = { * ... name: 'fred', * ... friends: [], * ... password: 'soopersekritssshhhh', * ... } * > cleanBy({ ...user }, 'password', { skipEmpty: true, }) * { name: 'fred', friends: [] } * > cleanBy({ ...user }, 'password', { skipEmpty: false }) * { name: 'fred' } * ``` * * @default {false} */ skipEmpty?: boolean; /** * Deep clones the original object when `true`. Use this if you don't want to * mutate the original object. * @default {false} */ clone?: boolean; } export declare function cleanBy(value: T, targets: string | string[], options?: CleanOptions): DeepPartial; export declare function clean(value: T, options?: CleanOptions): DeepPartial; export {};