ts-toolbelt
Version:
TypeScript's largest utility library
15 lines (14 loc) • 457 B
TypeScript
import { SelectKeys } from './SelectKeys';
import { Match } from '../Any/_Internal';
import { Pick } from './Pick';
/**
* Extract the fields of `O` that match `M`
* @param O to extract from
* @param M to select fields
* @param match (?=`'default'`) to change precision
* @returns [[Object]]
* @example
* ```ts
* ```
*/
export declare type Select<O extends object, M extends any, match extends Match = 'default'> = Pick<O, SelectKeys<O, M, match>>;