import { has } from '../has/has' ; import { Omit } from '../../types/omit' ; export const omit = < T , K extends keyof T > ( obj , props ) : Omit < T , K > => { const result = { } ; for ( const key in obj ) { if ( has ( key , obj ) && props . indexOf ( key as any ) < 0 ) { result [ key ] = obj [ key ] ; } } return result as Omit < T , K > ; } ;