rambdax
Version:
Extended version of Rambda - a lightweight, faster alternative to Ramda
17 lines (15 loc) • 419 B
text/typescript
import {SelectKeys} from './SelectKeys'
import {Match} from '../Any/_Internal'
import {Pick} from './Pick'
/**
Extract the fields of `O` that match `M`
```ts
```
*/
export type Select<O extends object, M extends any, match extends Match = 'default'> =
Pick<O, SelectKeys<O, M, match>>