File: declarationEmitClassMemberNameConflict.js

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (113 lines) | stat: -rw-r--r-- 2,504 bytes parent folder | download | duplicates (4)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//// [declarationEmitClassMemberNameConflict.ts]
export class C1 {
    C1() { } // has to be the same as the class name

    bar() {
        return function (t: typeof C1) {
        };
    }
}

export class C2 {
    C2: any // has to be the same as the class name

    bar() {
        return function (t: typeof C2) {
        };
    }
}

export class C3 {
    get C3() { return 0; } // has to be the same as the class name

    bar() {
        return function (t: typeof C3) {
        };
    }
}

export class C4 {
    set C4(v) { } // has to be the same as the class name

    bar() {
        return function (t: typeof C4) {
        };
    }
}

//// [declarationEmitClassMemberNameConflict.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.C4 = exports.C3 = exports.C2 = exports.C1 = void 0;
var C1 = /** @class */ (function () {
    function C1() {
    }
    C1.prototype.C1 = function () { }; // has to be the same as the class name
    C1.prototype.bar = function () {
        return function (t) {
        };
    };
    return C1;
}());
exports.C1 = C1;
var C2 = /** @class */ (function () {
    function C2() {
    }
    C2.prototype.bar = function () {
        return function (t) {
        };
    };
    return C2;
}());
exports.C2 = C2;
var C3 = /** @class */ (function () {
    function C3() {
    }
    Object.defineProperty(C3.prototype, "C3", {
        get: function () { return 0; } // has to be the same as the class name
        ,
        enumerable: false,
        configurable: true
    });
    C3.prototype.bar = function () {
        return function (t) {
        };
    };
    return C3;
}());
exports.C3 = C3;
var C4 = /** @class */ (function () {
    function C4() {
    }
    Object.defineProperty(C4.prototype, "C4", {
        set: function (v) { } // has to be the same as the class name
        ,
        enumerable: false,
        configurable: true
    });
    C4.prototype.bar = function () {
        return function (t) {
        };
    };
    return C4;
}());
exports.C4 = C4;


//// [declarationEmitClassMemberNameConflict.d.ts]
export declare class C1 {
    C1(): void;
    bar(): (t: typeof C1) => void;
}
export declare class C2 {
    C2: any;
    bar(): (t: typeof C2) => void;
}
export declare class C3 {
    get C3(): number;
    bar(): (t: typeof C3) => void;
}
export declare class C4 {
    set C4(v: any);
    bar(): (t: typeof C4) => void;
}