I am trying to compose a type, which, unlike Pick
, would remove certain properties from the object type.
It should work this way:
type ObjectType = {
key1: number,
key2: string,
key3: boolean,
key4: number[]
}
let obj: Remove<ObjectType, 'key2' | 'key4'>
Here obj
's type should be: { key1: number, key3: boolean }