38 lines
487 B
TypeScript
38 lines
487 B
TypeScript
|
module Test {
|
||
|
|
||
|
export class Example {
|
||
|
|
||
|
private someNumber: number;
|
||
|
|
||
|
|
||
|
|
||
|
public doSomething() {
|
||
|
|
||
|
var that = this;
|
||
|
|
||
|
function innerFunction() {
|
||
|
|
||
|
var num = that.someNumber;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
class C {
|
||
|
|
||
|
private x: number;
|
||
|
|
||
|
getX() { return this.x; }
|
||
|
|
||
|
clone(other: C) {
|
||
|
this.x = other.x;
|
||
|
|
||
|
}
|
||
|
}
|