TypeScript/tests/baselines/reference/privateInstanceVisibility.types

68 lines
1 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/privateInstanceVisibility.ts ===
module Test {
>Test : typeof Test
2014-08-15 23:33:16 +02:00
export class Example {
>Example : Example
2014-08-15 23:33:16 +02:00
private someNumber: number;
>someNumber : number
2014-08-15 23:33:16 +02:00
public doSomething() {
>doSomething : () => void
2014-08-15 23:33:16 +02:00
var that = this;
>that : Example
>this : Example
2014-08-15 23:33:16 +02:00
function innerFunction() {
>innerFunction : () => void
2014-08-15 23:33:16 +02:00
var num = that.someNumber;
>num : number
>that.someNumber : number
>that : Example
>someNumber : number
2014-08-15 23:33:16 +02:00
}
}
}
}
class C {
>C : C
2014-08-15 23:33:16 +02:00
private x: number;
>x : number
2014-08-15 23:33:16 +02:00
getX() { return this.x; }
>getX : () => number
>this.x : number
>this : C
>x : number
2014-08-15 23:33:16 +02:00
clone(other: C) {
>clone : (other: C) => void
>other : C
>C : C
2014-08-15 23:33:16 +02:00
this.x = other.x;
>this.x = other.x : number
>this.x : number
>this : C
>x : number
>other.x : number
>other : C
>x : number
2014-08-15 23:33:16 +02:00
}
}