For some reason I can't get this working.
This is what I have now (it's example code):
export interface Car {
id: number;
}
export interface Ferrari extends Car {
name: 'Enzo'
}
export type DoSomethingFn = <T extends Car>(car: T) => unknown;
export const doingSomething: DoSomethingFn = (car: Ferrari) => { ... }
For some reason it's complaining that type Car doesn't match Ferrari due to its name property. T extends Car must not work like I expect?