export function omit( obj: T, ...keys: U ): Omit { const ret: any = { ...obj }; keys.forEach((key) => delete ret[key]); return ret; } export function pick( obj: T, ...keys: U ): Pick { const ret: any = {}; keys.forEach((key) => (ret[key] = obj[key])); return ret; }