TypeScript/tests/baselines/reference/selfInLambdas.types

108 lines
2.2 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/selfInLambdas.ts ===
interface MouseEvent {
>MouseEvent : MouseEvent
2014-08-15 23:33:16 +02:00
x: number;
>x : number
2014-08-15 23:33:16 +02:00
y: number;
>y : number
2014-08-15 23:33:16 +02:00
}
declare var window: Window;
>window : Window
>Window : Window
2014-08-15 23:33:16 +02:00
interface Window {
>Window : Window
2014-08-15 23:33:16 +02:00
onmousemove: (ev: MouseEvent) => any;
>onmousemove : (ev: MouseEvent) => any
>ev : MouseEvent
>MouseEvent : MouseEvent
2014-08-15 23:33:16 +02:00
}
var o = {
>o : { counter: number; start: () => void; }
2014-08-22 03:39:46 +02:00
>{ counter: 0, start: function() { window.onmousemove = () => { this.counter++ var f = () => this.counter; } }} : { counter: number; start: () => void; }
2014-08-15 23:33:16 +02:00
counter: 0,
>counter : number
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
start: function() {
>start : () => void
2014-08-22 03:39:46 +02:00
>function() { window.onmousemove = () => { this.counter++ var f = () => this.counter; } } : () => void
2014-08-15 23:33:16 +02:00
window.onmousemove = () => {
2014-08-22 03:39:46 +02:00
>window.onmousemove = () => { this.counter++ var f = () => this.counter; } : () => void
>window.onmousemove : (ev: MouseEvent) => any
>window : Window
>onmousemove : (ev: MouseEvent) => any
2014-08-22 03:39:46 +02:00
>() => { this.counter++ var f = () => this.counter; } : () => void
2014-08-15 23:33:16 +02:00
this.counter++
>this.counter++ : number
>this.counter : any
>this : any
>counter : any
var f = () => this.counter;
>f : () => any
2014-08-15 23:33:16 +02:00
>() => this.counter : () => any
>this.counter : any
>this : any
>counter : any
}
}
}
class X {
>X : X
2014-08-15 23:33:16 +02:00
private value = "value";
>value : string
2015-04-13 21:36:11 +02:00
>"value" : string
2014-08-15 23:33:16 +02:00
public foo() {
>foo : () => void
2014-08-15 23:33:16 +02:00
var outer= () => {
>outer : () => void
2014-08-22 03:39:46 +02:00
>() => { var x = this.value; var inner = () => { var y = this.value; } inner(); } : () => void
2014-08-15 23:33:16 +02:00
var x = this.value;
>x : string
>this.value : string
>this : X
>value : string
2014-08-15 23:33:16 +02:00
var inner = () => {
>inner : () => void
2014-08-22 03:39:46 +02:00
>() => { var y = this.value; } : () => void
2014-08-15 23:33:16 +02:00
var y = this.value;
>y : string
>this.value : string
>this : X
>value : string
2014-08-15 23:33:16 +02:00
}
inner();
>inner() : void
>inner : () => void
2014-08-15 23:33:16 +02:00
};
outer();
>outer() : void
>outer : () => void
2014-08-15 23:33:16 +02:00
}
}