/** Returns a shallowly cloned object with the provided keys omitted */ export const omit = < Obj , Keys extends keyof Obj > ( obj , keys ) : Omit < Obj , Keys > => { return Object . keys ( obj ) . reduce ( ( acc , key ) => { if ( ! keys . includes ( key ) ) { acc [ key ] = ( obj as any ) [ key ] ; } return acc ; } , { } as any ) ; } ;