Here is a simple example:
interface BaseProps {
name: string;
}
class BaseClass<P extends BaseProps> extends React.Component<P, void> {
}
interface SuperProps {
}
class SuperClass extends BaseClass<SuperProps> {
}
I'm expecting that SuperClass by default would have this.props.name. But right now, I'm getting a compilation error, saying Type 'SuperProps' does not satisfy the constraint 'BaseProps'.Property 'name' is missing in type 'SuperProps'.
What am I doing wrong? I realize I can do SuperProps extends BaseProps but that seems redundant here.