I am not sure if I am misunderstanding how Exclude works but I have the following issue:
export interface Base {
page: number;
count: number;
}
export interface Sub extends Partial<Exclude<Base, 'count'>> { // error
count?: 'nonzero'|'zero';
}
The interface Sub is causing an error saying Sub incorrectly extends interface Partial<Base> however this is not what I was expecting. I was expecting that Sub extends Partial<{ page: number }> which is what I thought was the type of Exclude<Base, 'count'> however it does not seem to be the case.