export const excludeKeys = >( obj: T, keys: string[], ): T => { const newObj = { ...obj }; keys.forEach((key) => { delete newObj[key]; }); return newObj; };