I'm attempting to create a custom type that can remove specific properties from an object, unlike the Pick
utility.
The desired functionality is as follows:
type ObjectType = {
key1: number,
key2: string,
key3: boolean,
key4: number[]
}
let obj: Remove<ObjectType, 'key2' | 'key4'>
In this scenario, the type of obj
should be: { key1: number, key3: boolean }