function pick (object: O, keys: K[]): Pick { const result: any = {} for (const key of keys) { if (Object.prototype.hasOwnProperty.call(object, key)) { result[key] = object[key] } } return result } export { pick }