import type { TupleUnion } from "../../../types/array"; export const pick = ( obj: T, ...keys: Keys ): Pick> => // @ts-expect-error Array.prototype.reduce cannot infer the accumulated object type keys.reduce>>>((accumulate, key) => { Reflect.set(accumulate, key, Reflect.get(obj, key)); return accumulate; }, {});