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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
=== tests/cases/conformance/jsdoc/jsdocReadonlyDeclarations.js ===
class C {
>C : C
/** @readonly */
x = 6
>x : 6
>6 : 6
/** @readonly */
constructor(n) {
>n : any
this.x = n
>this.x = n : any
>this.x : 6
>this : this
>x : 6
>n : any
/**
* @readonly
* @type {number}
*/
this.y = n
>this.y = n : any
>this.y : number
>this : this
>y : number
>n : any
}
}
new C().x
>new C().x : 6
>new C() : C
>C : typeof C
>x : 6
function F() {
>F : typeof F
/** @readonly */
this.z = 1
>this.z = 1 : 1
>this.z : any
>this : this
>z : any
>1 : 1
}
// https://github.com/microsoft/TypeScript/issues/38401
class D {
>D : D
constructor(/** @readonly */ x) {}
>x : any
}
|