export function omit( object: T, keys: K[] ): Omit { const omitted: { [key: string]: unknown } = {} Object.keys(object).forEach((key) => { if (!keys.includes(key as K)) { omitted[key] = object[key] } }) return omitted as Omit }