17 lines
324 B
TypeScript
17 lines
324 B
TypeScript
|
// https://github.com/Microsoft/TypeScript/issues/16861
|
||
|
class BaseType<T> {
|
||
|
bar: T
|
||
|
}
|
||
|
|
||
|
class NextType<C extends { someProp: any }, T = C['someProp']> extends BaseType<T> {
|
||
|
baz: string;
|
||
|
}
|
||
|
|
||
|
class Foo extends NextType<Foo> {
|
||
|
someProp: {
|
||
|
test: true
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const foo = new Foo();
|
||
|
foo.bar.test
|