TypeScript/tests/baselines/reference/typeOfThisInMemberFunctions.types
2015-04-15 16:44:20 -07:00

72 lines
900 B
Plaintext

=== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/typeOfThisInMemberFunctions.ts ===
class C {
>C : C
foo() {
>foo : () => void
var r = this;
>r : C
>this : C
}
static bar() {
>bar : () => void
var r2 = this;
>r2 : typeof C
>this : typeof C
}
}
class D<T> {
>D : D<T>
>T : T
x: T;
>x : T
>T : T
foo() {
>foo : () => void
var r = this;
>r : D<T>
>this : D<T>
}
static bar() {
>bar : () => void
var r2 = this;
>r2 : typeof D
>this : typeof D
}
}
class E<T extends Date> {
>E : E<T>
>T : T
>Date : Date
x: T;
>x : T
>T : T
foo() {
>foo : () => void
var r = this;
>r : E<T>
>this : E<T>
}
static bar() {
>bar : () => void
var r2 = this;
>r2 : typeof E
>this : typeof E
}
}