UNPKG

typedash

Version:

modern, type-safe collection of utility functions

23 lines (22 loc) 1.4 kB
import { t as KeysOfUnion } from "./KeysOfUnion-D3-apcAx.cjs"; import { t as Many } from "./Many-bCNxekD7.cjs"; import { t as Maybe } from "./Maybe-BVpZiDsE.cjs"; import { t as ObjectPredicate } from "./createObjectPredicate-Cdp8ClLZ.cjs"; //#region src/functions/omit/omit.d.ts /** * Returns a new object with all properties except the specified properties from the input object. * @param object The input object to omit properties from. * @param properties An array of property names to omit from the input object. * @returns A new object with all properties except the specified properties from the input object. */ declare function omit<T extends object, const K extends keyof T | KeysOfUnion<T>>(object: Maybe<T>, properties: Many<K>): Omit<T, K>; /** * Returns a new object with all properties except the properties that satisfy the predicate function from the input object. * @param object The input object to omit properties from. * @param predicate A function that takes a property value and its key and returns a boolean indicating whether to omit the property or not. * @returns A new object with all properties except the properties that satisfy the predicate function from the input object. */ declare function omit<T extends object>(object: Maybe<T>, predicate: ObjectPredicate<T>): Partial<T>; //#endregion export { omit as t }; //# sourceMappingURL=omit-Cg9gl3pI.d.cts.map