18 lines
276 B
TypeScript
18 lines
276 B
TypeScript
// Repro from #14723
|
|
|
|
class Component<S> {
|
|
setState<K extends keyof S>(state: Pick<S, K>) {}
|
|
}
|
|
|
|
export interface State<T> {
|
|
a?: T;
|
|
}
|
|
|
|
class Foo {}
|
|
|
|
class Comp<T extends Foo, S> extends Component<S & State<T>>
|
|
{
|
|
foo(a: T) {
|
|
this.setState({ a: a });
|
|
}
|
|
}
|