TypeScript/tests/baselines/reference/typeOfThisInFunctionExpression.js
2014-08-14 06:21:30 -07:00

90 lines
1.4 KiB
TypeScript

//// [typeOfThisInFunctionExpression.ts]
// type of 'this' in FunctionExpression is Any
function fn() {
var p = this;
var p: any;
}
var t = function () {
var p = this;
var p: any;
}
var t2 = function f() {
var x = this;
var x: any;
}
class C {
x = function () {
var q: any;
var q = this;
}
y = function ff() {
var q: any;
var q = this;
}
}
module M {
function fn() {
var p = this;
var p: any;
}
var t = function () {
var p = this;
var p: any;
}
var t2 = function f() {
var x = this;
var x: any;
}
}
//// [typeOfThisInFunctionExpression.js]
// type of 'this' in FunctionExpression is Any
function fn() {
var p = this;
var p;
}
var t = function () {
var p = this;
var p;
};
var t2 = function f() {
var x = this;
var x;
};
var C = (function () {
function C() {
this.x = function () {
var q;
var q = this;
};
this.y = function ff() {
var q;
var q = this;
};
}
return C;
})();
var M;
(function (M) {
function fn() {
var p = this;
var p;
}
var t = function () {
var p = this;
var p;
};
var t2 = function f() {
var x = this;
var x;
};
})(M || (M = {}));