DEV Community

Discussion on: TS: How to override properties with type intersection

Collapse
 
marcosfreitas profile image
marcosfreitas

I think it could be more useful if We can still validates the presence of the properties as in the T1 interface.

interface T1 {
a: object
}

type overridenTypeOnly = Override

The result would be that "a" property has its type changed, but can't accept "b" property because it isn't in T1 interface.

Any solution for this?