TypeScript/tests/baselines/reference/typeOfThisInFunctionExpression.types

108 lines
1.6 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/expressions/functions/typeOfThisInFunctionExpression.ts ===
// type of 'this' in FunctionExpression is Any
function fn() {
>fn : () => void
2014-08-15 23:33:16 +02:00
var p = this;
>p : any
2014-08-15 23:33:16 +02:00
>this : any
var p: any;
>p : any
2014-08-15 23:33:16 +02:00
}
var t = function () {
>t : () => void
2014-08-22 03:39:46 +02:00
>function () { var p = this; var p: any;} : () => void
2014-08-15 23:33:16 +02:00
var p = this;
>p : any
2014-08-15 23:33:16 +02:00
>this : any
var p: any;
>p : any
2014-08-15 23:33:16 +02:00
}
var t2 = function f() {
>t2 : () => void
2014-08-22 03:39:46 +02:00
>function f() { var x = this; var x: any;} : () => void
>f : () => void
2014-08-15 23:33:16 +02:00
var x = this;
>x : any
2014-08-15 23:33:16 +02:00
>this : any
var x: any;
>x : any
2014-08-15 23:33:16 +02:00
}
class C {
>C : C
2014-08-15 23:33:16 +02:00
x = function () {
>x : () => void
2014-08-22 03:39:46 +02:00
>function () { var q: any; var q = this; } : () => void
2014-08-15 23:33:16 +02:00
var q: any;
>q : any
2014-08-15 23:33:16 +02:00
var q = this;
>q : any
2014-08-15 23:33:16 +02:00
>this : any
}
y = function ff() {
>y : () => void
2014-08-22 03:39:46 +02:00
>function ff() { var q: any; var q = this; } : () => void
>ff : () => void
2014-08-15 23:33:16 +02:00
var q: any;
>q : any
2014-08-15 23:33:16 +02:00
var q = this;
>q : any
2014-08-15 23:33:16 +02:00
>this : any
}
}
module M {
>M : typeof M
2014-08-15 23:33:16 +02:00
function fn() {
>fn : () => void
2014-08-15 23:33:16 +02:00
var p = this;
>p : any
2014-08-15 23:33:16 +02:00
>this : any
var p: any;
>p : any
2014-08-15 23:33:16 +02:00
}
var t = function () {
>t : () => void
2014-08-22 03:39:46 +02:00
>function () { var p = this; var p: any; } : () => void
2014-08-15 23:33:16 +02:00
var p = this;
>p : any
2014-08-15 23:33:16 +02:00
>this : any
var p: any;
>p : any
2014-08-15 23:33:16 +02:00
}
var t2 = function f() {
>t2 : () => void
2014-08-22 03:39:46 +02:00
>function f() { var x = this; var x: any; } : () => void
>f : () => void
2014-08-15 23:33:16 +02:00
var x = this;
>x : any
2014-08-15 23:33:16 +02:00
>this : any
var x: any;
>x : any
2014-08-15 23:33:16 +02:00
}
}