@spark-ui/internal-utils
Version:
package for sharing reusable code and resources across the codebase
17 lines (16 loc) • 384 B
TypeScript
/**
* Returns a partial copy of an object omitting the keys specified.
*
* @example
*
* const item = {
* label: 'ten',
* id: 10,
* isValid: true
* }
*
* const updatedItem = omit(item, ['label', 'isValid'])
* // updatedItem === { id: 10 }
*
*/
export declare function omit<T extends object, K extends keyof T>(obj: T, keys: readonly (K | undefined)[]): Omit<T, K>;