import type { TupleUnion } from "../../../types/array.mjs"; export const omit = ( obj: T, ...keys: Keys ): Omit> => { const keySet = new Set(keys); // @ts-expect-error Array.prototype.reduce cannot infer the accumulated object type return Reflect.ownKeys(obj).reduce>>>( (accumulate, key) => { !keySet.has(key) && Reflect.set(accumulate, key, Reflect.get(obj, key)); return accumulate; }, {} ); };