interface Iparent {
a: string
}
interface Ichild extends parent {
a: '';
}
const x: child = {}
This throws a compiler error when using child
How to provide a default value for a in child interface?
Edit:
Class parent actually looks like this:
class parent extends React.Component<Iparent> {}
class child extends React.Component<Ichild> {}
parent class should have a prop but child class should just have a default value for it i.e. ''