2018-05-03 23:00:52 +02:00
|
|
|
// @lib: es5
|
2017-03-01 01:09:42 +01:00
|
|
|
// @noImplicitAny: true
|
|
|
|
// @noImplicitThis: true
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
interface MouseEvent {
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var window: Window;
|
|
|
|
interface Window {
|
|
|
|
onmousemove: (ev: MouseEvent) => any;
|
|
|
|
|
|
|
|
}
|
|
|
|
var o = {
|
|
|
|
|
|
|
|
counter: 0,
|
|
|
|
|
|
|
|
start: function() {
|
|
|
|
|
|
|
|
window.onmousemove = () => {
|
|
|
|
this.counter++
|
|
|
|
var f = () => this.counter;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class X {
|
|
|
|
private value = "value";
|
|
|
|
|
|
|
|
public foo() {
|
|
|
|
var outer= () => {
|
|
|
|
var x = this.value;
|
|
|
|
var inner = () => {
|
|
|
|
var y = this.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
inner();
|
|
|
|
|
|
|
|
};
|
|
|
|
outer();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|