import { has } from '../has/has' ; export const pick = < T , K extends keyof T > ( obj , props ) : Pick < T , K > => { const result = { } ; for ( const key of props ) { if ( has ( key as string , obj ) ) { result [ key as string ] = obj [ key ] ; } } return result as Pick < T , K > ; } ;