TypeScript/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.types

45 lines
843 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/constraintCheckInGenericBaseTypeReference.ts ===
// No errors
class Constraint {
>Constraint : Constraint
2014-08-15 23:33:16 +02:00
public method() { }
>method : () => void
2014-08-15 23:33:16 +02:00
}
class GenericBase<T extends Constraint> {
>GenericBase : GenericBase<T>
>T : T
>Constraint : Constraint
2014-08-15 23:33:16 +02:00
public items: any;
>items : any
2014-08-15 23:33:16 +02:00
}
class Derived extends GenericBase<TypeArg> {
>Derived : Derived
2015-06-16 15:55:52 +02:00
>GenericBase : GenericBase<TypeArg>
>TypeArg : TypeArg
2014-08-15 23:33:16 +02:00
}
class TypeArg {
>TypeArg : TypeArg
2014-08-15 23:33:16 +02:00
public method() {
>method : () => void
2014-08-15 23:33:16 +02:00
Container.People.items;
>Container.People.items : any
>Container.People : Derived
>Container : typeof Container
>People : Derived
>items : any
2014-08-15 23:33:16 +02:00
}
}
class Container {
>Container : Container
2014-08-15 23:33:16 +02:00
public static People: Derived
>People : Derived
>Derived : Derived
2014-08-15 23:33:16 +02:00
}