rambdax
Version:
Extended version of Rambda - a lightweight, faster alternative to Ramda
18 lines (16 loc) • 425 B
text/typescript
import {SelectKeys} from './SelectKeys'
import {Match} from '../Any/_Internal'
/**
Check whether `O` has fields that match `M`
@param O to be inspected
@param M to check field type
@param match (?=`'default'`) to change precision
@returns [[Boolean]]
@example
```ts
```
*/
export type Includes<O extends object, M extends any, match extends Match = 'default'> =
[SelectKeys<O, M, match>] extends [never]
? 0
: 1