TypeStat
TypeStat copied to clipboard
Expand incompleteTypes property fixes to referenced extended generics
trafficstars
Similar to #180, but with function parameters of the generic type:
class Component<TState = {}> {
setState(newState: Partial<TState> | ((oldState: TState) => TState)) { }
}
+ type ClickableState = {
+ clicks: number,
+ }
- class Clickable extends Component {
+ class Clickable extends Component<ClickableState> {
state = {
clicks: 0,
};
click() {
this.setState(oldState => ({
clicks: oldState.clicks + 1,
}));
}
}