174 lines
3.1 KiB
Text
174 lines
3.1 KiB
Text
=== tests/cases/compiler/declFileAccessors_0.ts ===
|
|
|
|
/** This is comment for c1*/
|
|
export class c1 {
|
|
>c1 : c1
|
|
|
|
/** getter property*/
|
|
public get p3() {
|
|
>p3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
/** setter property*/
|
|
public set p3(/** this is value*/value: number) {
|
|
>p3 : number
|
|
>value : number
|
|
}
|
|
/** private getter property*/
|
|
private get pp3() {
|
|
>pp3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
/** private setter property*/
|
|
private set pp3(/** this is value*/value: number) {
|
|
>pp3 : number
|
|
>value : number
|
|
}
|
|
/** static getter property*/
|
|
static get s3() {
|
|
>s3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
/** setter property*/
|
|
static set s3( /** this is value*/value: number) {
|
|
>s3 : number
|
|
>value : number
|
|
}
|
|
public get nc_p3() {
|
|
>nc_p3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
public set nc_p3(value: number) {
|
|
>nc_p3 : number
|
|
>value : number
|
|
}
|
|
private get nc_pp3() {
|
|
>nc_pp3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
private set nc_pp3(value: number) {
|
|
>nc_pp3 : number
|
|
>value : number
|
|
}
|
|
static get nc_s3() {
|
|
>nc_s3 : string
|
|
|
|
return "";
|
|
>"" : string
|
|
}
|
|
static set nc_s3(value: string) {
|
|
>nc_s3 : string
|
|
>value : string
|
|
}
|
|
|
|
// Only getter property
|
|
public get onlyGetter() {
|
|
>onlyGetter : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
|
|
// Only setter property
|
|
public set onlySetter(value: number) {
|
|
>onlySetter : number
|
|
>value : number
|
|
}
|
|
}
|
|
|
|
=== tests/cases/compiler/declFileAccessors_1.ts ===
|
|
/** This is comment for c2 - the global class*/
|
|
class c2 {
|
|
>c2 : c2
|
|
|
|
/** getter property*/
|
|
public get p3() {
|
|
>p3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
/** setter property*/
|
|
public set p3(/** this is value*/value: number) {
|
|
>p3 : number
|
|
>value : number
|
|
}
|
|
/** private getter property*/
|
|
private get pp3() {
|
|
>pp3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
/** private setter property*/
|
|
private set pp3(/** this is value*/value: number) {
|
|
>pp3 : number
|
|
>value : number
|
|
}
|
|
/** static getter property*/
|
|
static get s3() {
|
|
>s3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
/** setter property*/
|
|
static set s3( /** this is value*/value: number) {
|
|
>s3 : number
|
|
>value : number
|
|
}
|
|
public get nc_p3() {
|
|
>nc_p3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
public set nc_p3(value: number) {
|
|
>nc_p3 : number
|
|
>value : number
|
|
}
|
|
private get nc_pp3() {
|
|
>nc_pp3 : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
private set nc_pp3(value: number) {
|
|
>nc_pp3 : number
|
|
>value : number
|
|
}
|
|
static get nc_s3() {
|
|
>nc_s3 : string
|
|
|
|
return "";
|
|
>"" : string
|
|
}
|
|
static set nc_s3(value: string) {
|
|
>nc_s3 : string
|
|
>value : string
|
|
}
|
|
|
|
// Only getter property
|
|
public get onlyGetter() {
|
|
>onlyGetter : number
|
|
|
|
return 10;
|
|
>10 : number
|
|
}
|
|
|
|
// Only setter property
|
|
public set onlySetter(value: number) {
|
|
>onlySetter : number
|
|
>value : number
|
|
}
|
|
}
|