TypeScript/tests/baselines/reference/typeOfThisInMemberFunctions.types

72 lines
2.4 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/typeOfThisInMemberFunctions.ts ===
class C {
2015-04-13 23:01:57 +02:00
>C : C, Symbol(C, Decl(typeOfThisInMemberFunctions.ts, 0, 0))
2014-08-15 23:33:16 +02:00
foo() {
2015-04-13 23:01:57 +02:00
>foo : () => void, Symbol(foo, Decl(typeOfThisInMemberFunctions.ts, 0, 9))
2014-08-15 23:33:16 +02:00
var r = this;
2015-04-13 23:01:57 +02:00
>r : C, Symbol(r, Decl(typeOfThisInMemberFunctions.ts, 2, 11))
>this : C, Symbol(C, Decl(typeOfThisInMemberFunctions.ts, 0, 0))
2014-08-15 23:33:16 +02:00
}
static bar() {
2015-04-13 23:01:57 +02:00
>bar : () => void, Symbol(C.bar, Decl(typeOfThisInMemberFunctions.ts, 3, 5))
2014-08-15 23:33:16 +02:00
var r2 = this;
2015-04-13 23:01:57 +02:00
>r2 : typeof C, Symbol(r2, Decl(typeOfThisInMemberFunctions.ts, 6, 11))
>this : typeof C, Symbol(C, Decl(typeOfThisInMemberFunctions.ts, 0, 0))
2014-08-15 23:33:16 +02:00
}
}
class D<T> {
2015-04-13 23:01:57 +02:00
>D : D<T>, Symbol(D, Decl(typeOfThisInMemberFunctions.ts, 8, 1))
>T : T, Symbol(T, Decl(typeOfThisInMemberFunctions.ts, 10, 8))
2014-08-15 23:33:16 +02:00
x: T;
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(typeOfThisInMemberFunctions.ts, 10, 12))
>T : T, Symbol(T, Decl(typeOfThisInMemberFunctions.ts, 10, 8))
2014-08-15 23:33:16 +02:00
foo() {
2015-04-13 23:01:57 +02:00
>foo : () => void, Symbol(foo, Decl(typeOfThisInMemberFunctions.ts, 11, 9))
2014-08-15 23:33:16 +02:00
var r = this;
2015-04-13 23:01:57 +02:00
>r : D<T>, Symbol(r, Decl(typeOfThisInMemberFunctions.ts, 13, 11))
>this : D<T>, Symbol(D, Decl(typeOfThisInMemberFunctions.ts, 8, 1))
2014-08-15 23:33:16 +02:00
}
static bar() {
2015-04-13 23:01:57 +02:00
>bar : () => void, Symbol(D.bar, Decl(typeOfThisInMemberFunctions.ts, 14, 5))
2014-08-15 23:33:16 +02:00
var r2 = this;
2015-04-13 23:01:57 +02:00
>r2 : typeof D, Symbol(r2, Decl(typeOfThisInMemberFunctions.ts, 17, 11))
>this : typeof D, Symbol(D, Decl(typeOfThisInMemberFunctions.ts, 8, 1))
2014-08-15 23:33:16 +02:00
}
}
class E<T extends Date> {
2015-04-13 23:01:57 +02:00
>E : E<T>, Symbol(E, Decl(typeOfThisInMemberFunctions.ts, 19, 1))
>T : T, Symbol(T, Decl(typeOfThisInMemberFunctions.ts, 21, 8))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-08-15 23:33:16 +02:00
x: T;
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(typeOfThisInMemberFunctions.ts, 21, 25))
>T : T, Symbol(T, Decl(typeOfThisInMemberFunctions.ts, 21, 8))
2014-08-15 23:33:16 +02:00
foo() {
2015-04-13 23:01:57 +02:00
>foo : () => void, Symbol(foo, Decl(typeOfThisInMemberFunctions.ts, 22, 9))
2014-08-15 23:33:16 +02:00
var r = this;
2015-04-13 23:01:57 +02:00
>r : E<T>, Symbol(r, Decl(typeOfThisInMemberFunctions.ts, 24, 11))
>this : E<T>, Symbol(E, Decl(typeOfThisInMemberFunctions.ts, 19, 1))
2014-08-15 23:33:16 +02:00
}
static bar() {
2015-04-13 23:01:57 +02:00
>bar : () => void, Symbol(E.bar, Decl(typeOfThisInMemberFunctions.ts, 25, 5))
2014-08-15 23:33:16 +02:00
var r2 = this;
2015-04-13 23:01:57 +02:00
>r2 : typeof E, Symbol(r2, Decl(typeOfThisInMemberFunctions.ts, 28, 11))
>this : typeof E, Symbol(E, Decl(typeOfThisInMemberFunctions.ts, 19, 1))
2014-08-15 23:33:16 +02:00
}
}