File: override4.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 (93 lines) | stat: -rw-r--r-- 2,402 bytes parent folder | download | duplicates (3)
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
//// [override4.ts]
class B {
    p1: number = 1;
    p2: number = 1;
    p3: () => void;
    p4: () => void;
    foo (v: string) {}
    fooo (v: string) {}
}

class D extends B {
    p1: number = 2;
    override p2: number = 3;
    p3: () => void;
    override p4: () => void;
    override foo (v: string) {}

    fooo (v: string) {}

}

class DD extends B {
    override foo: () => void
    fooo: () => void;
}

//// [override4.js]
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var B = /** @class */ (function () {
    function B() {
        this.p1 = 1;
        this.p2 = 1;
    }
    B.prototype.foo = function (v) { };
    B.prototype.fooo = function (v) { };
    return B;
}());
var D = /** @class */ (function (_super) {
    __extends(D, _super);
    function D() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.p1 = 2;
        _this.p2 = 3;
        return _this;
    }
    D.prototype.foo = function (v) { };
    D.prototype.fooo = function (v) { };
    return D;
}(B));
var DD = /** @class */ (function (_super) {
    __extends(DD, _super);
    function DD() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return DD;
}(B));


//// [override4.d.ts]
declare class B {
    p1: number;
    p2: number;
    p3: () => void;
    p4: () => void;
    foo(v: string): void;
    fooo(v: string): void;
}
declare class D extends B {
    p1: number;
    p2: number;
    p3: () => void;
    p4: () => void;
    foo(v: string): void;
    fooo(v: string): void;
}
declare class DD extends B {
    foo: () => void;
    fooo: () => void;
}