TypeScript/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.types

45 lines
2.3 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/constraintCheckInGenericBaseTypeReference.ts ===
// No errors
class Constraint {
2015-04-13 23:01:57 +02:00
>Constraint : Constraint, Symbol(Constraint, Decl(constraintCheckInGenericBaseTypeReference.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public method() { }
2015-04-13 23:01:57 +02:00
>method : () => void, Symbol(method, Decl(constraintCheckInGenericBaseTypeReference.ts, 1, 18))
2014-08-15 23:33:16 +02:00
}
class GenericBase<T extends Constraint> {
2015-04-13 23:01:57 +02:00
>GenericBase : GenericBase<T>, Symbol(GenericBase, Decl(constraintCheckInGenericBaseTypeReference.ts, 3, 1))
>T : T, Symbol(T, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 18))
>Constraint : Constraint, Symbol(Constraint, Decl(constraintCheckInGenericBaseTypeReference.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public items: any;
2015-04-13 23:01:57 +02:00
>items : any, Symbol(items, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 41))
2014-08-15 23:33:16 +02:00
}
class Derived extends GenericBase<TypeArg> {
2015-04-13 23:01:57 +02:00
>Derived : Derived, Symbol(Derived, Decl(constraintCheckInGenericBaseTypeReference.ts, 6, 1))
>GenericBase : GenericBase<T>, Symbol(GenericBase, Decl(constraintCheckInGenericBaseTypeReference.ts, 3, 1))
>TypeArg : TypeArg, Symbol(TypeArg, Decl(constraintCheckInGenericBaseTypeReference.ts, 9, 1))
2014-08-15 23:33:16 +02:00
}
class TypeArg {
2015-04-13 23:01:57 +02:00
>TypeArg : TypeArg, Symbol(TypeArg, Decl(constraintCheckInGenericBaseTypeReference.ts, 9, 1))
2014-08-15 23:33:16 +02:00
public method() {
2015-04-13 23:01:57 +02:00
>method : () => void, Symbol(method, Decl(constraintCheckInGenericBaseTypeReference.ts, 10, 15))
2014-08-15 23:33:16 +02:00
Container.People.items;
2015-04-13 23:01:57 +02:00
>Container.People.items : any, Symbol(GenericBase.items, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 41))
>Container.People : Derived, Symbol(Container.People, Decl(constraintCheckInGenericBaseTypeReference.ts, 16, 17))
>Container : typeof Container, Symbol(Container, Decl(constraintCheckInGenericBaseTypeReference.ts, 14, 1))
>People : Derived, Symbol(Container.People, Decl(constraintCheckInGenericBaseTypeReference.ts, 16, 17))
>items : any, Symbol(GenericBase.items, Decl(constraintCheckInGenericBaseTypeReference.ts, 4, 41))
2014-08-15 23:33:16 +02:00
}
}
class Container {
2015-04-13 23:01:57 +02:00
>Container : Container, Symbol(Container, Decl(constraintCheckInGenericBaseTypeReference.ts, 14, 1))
2014-08-15 23:33:16 +02:00
public static People: Derived
2015-04-13 23:01:57 +02:00
>People : Derived, Symbol(Container.People, Decl(constraintCheckInGenericBaseTypeReference.ts, 16, 17))
>Derived : Derived, Symbol(Derived, Decl(constraintCheckInGenericBaseTypeReference.ts, 6, 1))
2014-08-15 23:33:16 +02:00
}