File: metadataOfUnionWithNull.js

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (113 lines) | stat: -rw-r--r-- 2,904 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
//// [metadataOfUnionWithNull.ts]
function PropDeco(target: Object, propKey: string | symbol) { }

class A {
}

class B {
    @PropDeco
    x: "foo" | null;

    @PropDeco
    y: true | never;

    @PropDeco
    z: "foo" | undefined;

    @PropDeco
    a: null;

    @PropDeco
    b: never;

    @PropDeco
    c: undefined;

    @PropDeco
    d: undefined | null;

    @PropDeco
    e: symbol | null;

    @PropDeco
    f: symbol | A;

    @PropDeco
    g: A | null;

    @PropDeco
    h: null | B;

    @PropDeco
    j: null | symbol;
}

//// [metadataOfUnionWithNull.js]
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
function PropDeco(target, propKey) { }
var A = /** @class */ (function () {
    function A() {
    }
    return A;
}());
var B = /** @class */ (function () {
    function B() {
    }
    __decorate([
        PropDeco,
        __metadata("design:type", String)
    ], B.prototype, "x");
    __decorate([
        PropDeco,
        __metadata("design:type", Boolean)
    ], B.prototype, "y");
    __decorate([
        PropDeco,
        __metadata("design:type", String)
    ], B.prototype, "z");
    __decorate([
        PropDeco,
        __metadata("design:type", void 0)
    ], B.prototype, "a");
    __decorate([
        PropDeco,
        __metadata("design:type", void 0)
    ], B.prototype, "b");
    __decorate([
        PropDeco,
        __metadata("design:type", void 0)
    ], B.prototype, "c");
    __decorate([
        PropDeco,
        __metadata("design:type", void 0)
    ], B.prototype, "d");
    __decorate([
        PropDeco,
        __metadata("design:type", typeof Symbol === "function" ? Symbol : Object)
    ], B.prototype, "e");
    __decorate([
        PropDeco,
        __metadata("design:type", Object)
    ], B.prototype, "f");
    __decorate([
        PropDeco,
        __metadata("design:type", A)
    ], B.prototype, "g");
    __decorate([
        PropDeco,
        __metadata("design:type", B)
    ], B.prototype, "h");
    __decorate([
        PropDeco,
        __metadata("design:type", typeof Symbol === "function" ? Symbol : Object)
    ], B.prototype, "j");
    return B;
}());