export type TGetObjWithOmittedPropsArgs = Parameters; export type TGetObjWithOmittedPropsReturn = ReturnType; /** * Creates an object without selected own properties. * @template T,TKey * @param {T} obj Source object * @param {TKey[]} keys Keys to omit * @returns {Omit} Remaining properties * @throws {TypeError} getObjWithOmittedProps: obj must be a plain object * @throws {TypeError} getObjWithOmittedProps: keys must be an array * @example * getObjWithOmittedProps({ id: 1, password: "secret" }, [ "password" ]); // { id: 1 } * @example * // Remove internal fields before sending a public API response * const publicUser = getObjWithOmittedProps(user, [ "passwordHash", "internalNotes" ]); */ export declare const getObjWithOmittedProps: (obj: T, keys: readonly TKey[]) => Omit;