rambdax
Version:
Extended version of Rambda - a lightweight, faster alternative to Ramda
24 lines (21 loc) • 448 B
text/typescript
import {_Pick} from './Pick'
import {Exclude} from '../Union/Exclude'
import {Key} from '../Any/Key'
/**
* @hidden
*/
export type _Omit<O extends object, K extends Key> =
_Pick<O, Exclude<keyof O, K>>
/**
Remove out of `O` the fields of key `K`
@param O to remove from
@param K to chose fields
@returns [[Object]]
@example
```ts
```
*/
export type Omit<O extends object, K extends Key> =
O extends unknown
? _Omit<O, K>
: never