diginext-utils
Version:
README.md
17 lines • 579 B
TypeScript
/**
* Creates a new object excluding the specified keys from the source object.
*
* @template T - The type of the source object
* @template K - The keys to omit
* @param obj - The source object
* @param keys - The keys to exclude from the new object
* @returns A new object without the specified keys
*
* @example
* ```ts
* const obj = { a: 1, b: 2, c: 3, d: 4 };
* omit(obj, ['b', 'd']); // { a: 1, c: 3 }
* ```
*/
export declare function omit<T extends Record<string, unknown>, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
//# sourceMappingURL=omit.d.ts.map