/** return shallow clone of object without given props */ export function exclude(o: T, ...exclude: K[]): Pick> { const clone = { ...o }; for (const item of exclude) { delete clone[item]; } return clone; }