export declare function compact(obj: T): Exclude[]; export declare function compact(obj: T): { [K in NonNullKeys]: Exclude; }; /** * Removes all null and undefined values from an array or object. * * Examples: * compact(['a', 2, null, undefined]) // ['a', 2] * compact({ a: 1, b: 'b', c: null, d: undefined }) // { a: 1, b: 'b' } * * @param obj - The array or object to compact * @returns A new array or object with all null and undefined values removed */ export default function compact[] : T extends { [key: string]: any; } ? { [K in NonNullKeys]: Exclude; } : never>(obj: T): RetType;