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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
=== tests/cases/compiler/declarationEmitClassMemberNameConflict.ts ===
export class C1 {
>C1 : C1
C1() { } // has to be the same as the class name
>C1 : () => void
bar() {
>bar : () => (t: typeof C1) => void
return function (t: typeof C1) {
>function (t: typeof C1) { } : (t: typeof C1) => void
>t : typeof C1
>C1 : typeof C1
};
}
}
export class C2 {
>C2 : C2
C2: any // has to be the same as the class name
>C2 : any
bar() {
>bar : () => (t: typeof C2) => void
return function (t: typeof C2) {
>function (t: typeof C2) { } : (t: typeof C2) => void
>t : typeof C2
>C2 : typeof C2
};
}
}
export class C3 {
>C3 : C3
get C3() { return 0; } // has to be the same as the class name
>C3 : number
>0 : 0
bar() {
>bar : () => (t: typeof C3) => void
return function (t: typeof C3) {
>function (t: typeof C3) { } : (t: typeof C3) => void
>t : typeof C3
>C3 : typeof C3
};
}
}
export class C4 {
>C4 : C4
set C4(v) { } // has to be the same as the class name
>C4 : any
>v : any
bar() {
>bar : () => (t: typeof C4) => void
return function (t: typeof C4) {
>function (t: typeof C4) { } : (t: typeof C4) => void
>t : typeof C4
>C4 : typeof C4
};
}
}
|