type OmitKeys = Pick>; /** * Removes specified keys from an object and returns a new object without those keys. */ export function removeObjectKeys( obj: T, keys: K[], ): OmitKeys { const result = { ...obj }; for (const key of keys) { delete result[key]; } return result; }