1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
=== tests/cases/conformance/salsa/a.js ===
// mixed prototype-assignment+function declaration
function C() { this.p = 1; }
>C : typeof C
>this.p = 1 : 1
>this.p : any
>this : any
>p : any
>1 : 1
C.prototype = { q: 2 };
>C.prototype = { q: 2 } : { q: number; }
>C.prototype : { q: number; }
>C : typeof C
>prototype : { q: number; }
>{ q: 2 } : { q: number; }
>q : number
>2 : 2
const c = new C()
>c : C & { q: number; }
>new C() : C & { q: number; }
>C : typeof C
c.p
>c.p : number
>c : C & { q: number; }
>p : number
c.q
>c.q : number
>c : C & { q: number; }
>q : number
|