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