Test code: 1 + 1. More code: 1 + {}.
Check out this function: (n : number) => n + 1
((x) => { var y = x + 42; return "abc"; })((x) => { var y = x + 42; return "abc"; })(91)((x : number) => { var y : number = x * 'a' ; return "abc"; })(1 + {})class c1 {
x = 42;
f() {
return [1,2,3].map(n => n + this.x );
}
}
new c1().f();
class c {
x = 42;
name = "Fred";
f()
{
return this.name + this.x;
}
}
new c().f();
class c {
x = 42;
name = "Fred";
f()
{
return this.name + this.x;
}
}
new c().f();
function f(n: number) {
return 42;
}