react-obsidian 2.20.1 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.legacy.js +13 -0
- package/dist/src/decorators/Graph.d.ts +2 -2
- package/dist/src/decorators/Graph.d.ts.map +1 -1
- package/dist/src/decorators/Graph.js +3 -3
- package/dist/src/decorators/Graph.js.map +1 -1
- package/dist/src/decorators/inject/Inject.d.ts +1 -1
- package/dist/src/decorators/inject/Inject.d.ts.map +1 -1
- package/dist/src/decorators/inject/Inject.js +7 -7
- package/dist/src/decorators/inject/Inject.js.map +1 -1
- package/dist/src/decorators/inject/inject.legacy.d.ts +2 -0
- package/dist/src/decorators/inject/inject.legacy.d.ts.map +1 -0
- package/dist/src/decorators/inject/inject.legacy.js +12 -0
- package/dist/src/decorators/inject/inject.legacy.js.map +1 -0
- package/dist/src/decorators/inject/inject.modern.d.ts +5 -0
- package/dist/src/decorators/inject/inject.modern.d.ts.map +1 -0
- package/dist/src/decorators/inject/{LateInject.js → inject.modern.js} +6 -6
- package/dist/src/decorators/inject/inject.modern.js.map +1 -0
- package/dist/src/decorators/injectable/Injectable.d.ts.map +1 -0
- package/dist/src/decorators/injectable/Injectable.js.map +1 -0
- package/dist/src/decorators/lateInject/LateInject.d.ts.map +1 -0
- package/dist/src/decorators/lateInject/LateInject.js +14 -0
- package/dist/src/decorators/lateInject/LateInject.js.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.d.ts +2 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.d.ts.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.js +12 -0
- package/dist/src/decorators/lateInject/lateInject.legacy.js.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.modern.d.ts +5 -0
- package/dist/src/decorators/lateInject/lateInject.modern.d.ts.map +1 -0
- package/dist/src/decorators/lateInject/lateInject.modern.js +14 -0
- package/dist/src/decorators/lateInject/lateInject.modern.js.map +1 -0
- package/dist/src/decorators/provides/Provides.d.ts +1 -2
- package/dist/src/decorators/provides/Provides.d.ts.map +1 -1
- package/dist/src/decorators/provides/Provides.js +7 -8
- package/dist/src/decorators/provides/Provides.js.map +1 -1
- package/dist/src/decorators/provides/provides.legacy.d.ts +3 -0
- package/dist/src/decorators/provides/provides.legacy.d.ts.map +1 -0
- package/dist/src/decorators/provides/provides.legacy.js +13 -0
- package/dist/src/decorators/provides/provides.legacy.js.map +1 -0
- package/dist/src/decorators/provides/provides.modern.d.ts +2 -0
- package/dist/src/decorators/provides/provides.modern.d.ts.map +1 -0
- package/dist/src/decorators/provides/provides.modern.js +34 -0
- package/dist/src/decorators/provides/provides.modern.js.map +1 -0
- package/dist/src/decorators/singleton/Singleton.d.ts +2 -0
- package/dist/src/decorators/singleton/Singleton.d.ts.map +1 -0
- package/dist/src/decorators/singleton/Singleton.js +14 -0
- package/dist/src/decorators/singleton/Singleton.js.map +1 -0
- package/dist/src/decorators/singleton/singleton.legacy.d.ts +4 -0
- package/dist/src/decorators/singleton/singleton.legacy.d.ts.map +1 -0
- package/dist/src/decorators/singleton/singleton.legacy.js +10 -0
- package/dist/src/decorators/singleton/singleton.legacy.js.map +1 -0
- package/dist/src/decorators/singleton/singleton.modern.d.ts +2 -0
- package/dist/src/decorators/singleton/singleton.modern.d.ts.map +1 -0
- package/dist/src/decorators/singleton/singleton.modern.js +9 -0
- package/dist/src/decorators/singleton/singleton.modern.js.map +1 -0
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils/decorators.d.ts +2 -0
- package/dist/src/utils/decorators.d.ts.map +1 -0
- package/dist/src/utils/decorators.js +7 -0
- package/dist/src/utils/decorators.js.map +1 -0
- package/dist/test/fixtures/CircularDependencyFromSubgraph.js +66 -21
- package/dist/test/fixtures/CircularDependencyFromSubgraph.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph.js +66 -21
- package/dist/test/fixtures/CircularDependencyGraph.js.map +1 -1
- package/dist/test/fixtures/CircularDependencyGraph2.js +78 -39
- package/dist/test/fixtures/CircularDependencyGraph2.js.map +1 -1
- package/dist/test/fixtures/GraphWithMultipleDependencies.js +84 -48
- package/dist/test/fixtures/GraphWithMultipleDependencies.js.map +1 -1
- package/dist/test/fixtures/GraphWithOnBind.js +69 -24
- package/dist/test/fixtures/GraphWithOnBind.js.map +1 -1
- package/dist/test/fixtures/LifecycleBoundGraph.js +79 -41
- package/dist/test/fixtures/LifecycleBoundGraph.js.map +1 -1
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js +66 -22
- package/dist/test/fixtures/LifecycleBoundWithLifecycleBoundSubgraph.js.map +1 -1
- package/dist/test/fixtures/MainGraph.js +72 -31
- package/dist/test/fixtures/MainGraph.js.map +1 -1
- package/dist/test/fixtures/ScopedLifecycleBoundGraph.js +56 -11
- package/dist/test/fixtures/ScopedLifecycleBoundGraph.js.map +1 -1
- package/dist/test/fixtures/SingletonGraph.js +67 -27
- package/dist/test/fixtures/SingletonGraph.js.map +1 -1
- package/dist/test/fixtures/Subgraph.js +84 -48
- package/dist/test/fixtures/Subgraph.js.map +1 -1
- package/dist/test/fixtures/SubgraphWithCircularDependency.js +72 -31
- package/dist/test/fixtures/SubgraphWithCircularDependency.js.map +1 -1
- package/dist/test/fixtures/ThrowingMainGraph.js +66 -21
- package/dist/test/fixtures/ThrowingMainGraph.js.map +1 -1
- package/dist/test/fixtures/UniqueNumberGraph.js +73 -37
- package/dist/test/fixtures/UniqueNumberGraph.js.map +1 -1
- package/jest.config.legacy.js +26 -0
- package/package.json +21 -17
- package/src/decorators/Graph.ts +5 -5
- package/src/decorators/inject/Inject.ts +7 -8
- package/src/decorators/inject/inject.legacy.ts +11 -0
- package/src/decorators/inject/inject.modern.ts +12 -0
- package/src/decorators/lateInject/LateInject.ts +11 -0
- package/src/decorators/lateInject/lateInject.legacy.ts +11 -0
- package/src/decorators/lateInject/lateInject.modern.ts +12 -0
- package/src/decorators/provides/Provides.ts +8 -7
- package/src/decorators/provides/provides.legacy.ts +13 -0
- package/src/decorators/provides/provides.modern.ts +36 -0
- package/src/decorators/singleton/Singleton.ts +11 -0
- package/src/decorators/singleton/singleton.legacy.ts +13 -0
- package/src/decorators/singleton/singleton.modern.ts +8 -0
- package/src/index.ts +6 -6
- package/src/utils/decorators.ts +3 -0
- package/wallaby.legacy.js +9 -0
- package/dist/src/decorators/Singleton.d.ts +0 -4
- package/dist/src/decorators/Singleton.d.ts.map +0 -1
- package/dist/src/decorators/Singleton.js +0 -12
- package/dist/src/decorators/Singleton.js.map +0 -1
- package/dist/src/decorators/inject/Injectable.d.ts.map +0 -1
- package/dist/src/decorators/inject/Injectable.js.map +0 -1
- package/dist/src/decorators/inject/LateInject.d.ts.map +0 -1
- package/dist/src/decorators/inject/LateInject.js.map +0 -1
- package/src/decorators/Singleton.ts +0 -15
- package/src/decorators/inject/LateInject.ts +0 -8
- /package/dist/src/decorators/{inject → injectable}/Injectable.d.ts +0 -0
- /package/dist/src/decorators/{inject → injectable}/Injectable.js +0 -0
- /package/dist/src/decorators/{inject → lateInject}/LateInject.d.ts +0 -0
- /package/src/decorators/{inject → injectable}/Injectable.ts +0 -0
|
@@ -1,30 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
exports.CircularDependencyFromSubgraph = void 0;
|
|
13
42
|
const src_1 = require("../../src");
|
|
14
43
|
const SubgraphWithCircularDependency_1 = require("./SubgraphWithCircularDependency");
|
|
15
|
-
let CircularDependencyFromSubgraph =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
44
|
+
let CircularDependencyFromSubgraph = (() => {
|
|
45
|
+
let _classDecorators = [(0, src_1.Graph)({ subgraphs: [SubgraphWithCircularDependency_1.SubgraphWithCircularDependency] })];
|
|
46
|
+
let _classDescriptor;
|
|
47
|
+
let _classExtraInitializers = [];
|
|
48
|
+
let _classThis;
|
|
49
|
+
let _classSuper = src_1.ObjectGraph;
|
|
50
|
+
let _instanceExtraInitializers = [];
|
|
51
|
+
let _dep1_decorators;
|
|
52
|
+
var CircularDependencyFromSubgraph = _classThis = class extends _classSuper {
|
|
53
|
+
dep1(dep2) {
|
|
54
|
+
return dep2;
|
|
55
|
+
}
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments);
|
|
58
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
__setFunctionName(_classThis, "CircularDependencyFromSubgraph");
|
|
62
|
+
(() => {
|
|
63
|
+
var _a;
|
|
64
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
65
|
+
_dep1_decorators = [(0, src_1.Provides)()];
|
|
66
|
+
__esDecorate(_classThis, null, _dep1_decorators, { kind: "method", name: "dep1", static: false, private: false, access: { has: obj => "dep1" in obj, get: obj => obj.dep1 }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
67
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
68
|
+
CircularDependencyFromSubgraph = _classThis = _classDescriptor.value;
|
|
69
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
70
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
71
|
+
})();
|
|
72
|
+
return CircularDependencyFromSubgraph = _classThis;
|
|
73
|
+
})();
|
|
20
74
|
exports.CircularDependencyFromSubgraph = CircularDependencyFromSubgraph;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, src_1.Provides)(),
|
|
23
|
-
__metadata("design:type", Function),
|
|
24
|
-
__metadata("design:paramtypes", [Object]),
|
|
25
|
-
__metadata("design:returntype", void 0)
|
|
26
|
-
], CircularDependencyFromSubgraph.prototype, "dep1", null);
|
|
27
|
-
exports.CircularDependencyFromSubgraph = CircularDependencyFromSubgraph = __decorate([
|
|
28
|
-
(0, src_1.Graph)({ subgraphs: [SubgraphWithCircularDependency_1.SubgraphWithCircularDependency] })
|
|
29
|
-
], CircularDependencyFromSubgraph);
|
|
30
75
|
//# sourceMappingURL=CircularDependencyFromSubgraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularDependencyFromSubgraph.js","sourceRoot":"","sources":["../../../test/fixtures/CircularDependencyFromSubgraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CircularDependencyFromSubgraph.js","sourceRoot":"","sources":["../../../test/fixtures/CircularDependencyFromSubgraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyD;AACzD,qFAAkF;IAGrE,8BAA8B;4BAD1C,IAAA,WAAK,EAAC,EAAE,SAAS,EAAE,CAAC,+DAA8B,CAAC,EAAE,CAAC;;;;sBACH,iBAAW;;;2DAAnB,SAAQ,WAAW;QAE7D,IAAI,CAAC,IAAS;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;;;YAJU,mDAA8B;;;;;;;4BACxC,IAAA,cAAQ,GAAE;QACX,qKAAA,IAAI,6DAEH;QAJH,6KAKC;;;QALY,uDAA8B;;;;AAA9B,wEAA8B"}
|
|
@@ -1,29 +1,74 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
exports.CircularDependencyGraph = void 0;
|
|
13
42
|
const src_1 = require("../../src");
|
|
14
|
-
let CircularDependencyGraph =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
43
|
+
let CircularDependencyGraph = (() => {
|
|
44
|
+
let _classDecorators = [(0, src_1.Graph)()];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = src_1.ObjectGraph;
|
|
49
|
+
let _instanceExtraInitializers = [];
|
|
50
|
+
let _aString_decorators;
|
|
51
|
+
var CircularDependencyGraph = _classThis = class extends _classSuper {
|
|
52
|
+
aString(aString) {
|
|
53
|
+
return aString;
|
|
54
|
+
}
|
|
55
|
+
constructor() {
|
|
56
|
+
super(...arguments);
|
|
57
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
__setFunctionName(_classThis, "CircularDependencyGraph");
|
|
61
|
+
(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
64
|
+
_aString_decorators = [(0, src_1.Provides)()];
|
|
65
|
+
__esDecorate(_classThis, null, _aString_decorators, { kind: "method", name: "aString", static: false, private: false, access: { has: obj => "aString" in obj, get: obj => obj.aString }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
66
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
67
|
+
CircularDependencyGraph = _classThis = _classDescriptor.value;
|
|
68
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
69
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
70
|
+
})();
|
|
71
|
+
return CircularDependencyGraph = _classThis;
|
|
72
|
+
})();
|
|
19
73
|
exports.CircularDependencyGraph = CircularDependencyGraph;
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, src_1.Provides)(),
|
|
22
|
-
__metadata("design:type", Function),
|
|
23
|
-
__metadata("design:paramtypes", [String]),
|
|
24
|
-
__metadata("design:returntype", void 0)
|
|
25
|
-
], CircularDependencyGraph.prototype, "aString", null);
|
|
26
|
-
exports.CircularDependencyGraph = CircularDependencyGraph = __decorate([
|
|
27
|
-
(0, src_1.Graph)()
|
|
28
|
-
], CircularDependencyGraph);
|
|
29
74
|
//# sourceMappingURL=CircularDependencyGraph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularDependencyGraph.js","sourceRoot":"","sources":["../../../test/fixtures/CircularDependencyGraph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CircularDependencyGraph.js","sourceRoot":"","sources":["../../../test/fixtures/CircularDependencyGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyD;IAG5C,uBAAuB;4BADnC,IAAA,WAAK,GAAE;;;;sBACqC,iBAAW;;;oDAAnB,SAAQ,WAAW;QAEtD,OAAO,CAAC,OAAe;YACrB,OAAO,OAAO,CAAC;QACjB,CAAC;;;YAJU,mDAAuB;;;;;;;+BACjC,IAAA,cAAQ,GAAE;QACX,8KAAA,OAAO,6DAEN;QAJH,6KAKC;;;QALY,uDAAuB;;;;AAAvB,0DAAuB"}
|
|
@@ -1,47 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
exports.CircularDependencyGraph2 = void 0;
|
|
13
42
|
const src_1 = require("../../src");
|
|
14
|
-
let CircularDependencyGraph2 =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
43
|
+
let CircularDependencyGraph2 = (() => {
|
|
44
|
+
let _classDecorators = [(0, src_1.Graph)()];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = src_1.ObjectGraph;
|
|
49
|
+
let _instanceExtraInitializers = [];
|
|
50
|
+
let _dep1_decorators;
|
|
51
|
+
let _dep2_decorators;
|
|
52
|
+
let _dep3_decorators;
|
|
53
|
+
var CircularDependencyGraph2 = _classThis = class extends _classSuper {
|
|
54
|
+
dep1(dep2) {
|
|
55
|
+
return dep2;
|
|
56
|
+
}
|
|
57
|
+
dep2(dep3) {
|
|
58
|
+
return dep3;
|
|
59
|
+
}
|
|
60
|
+
dep3(dep1) {
|
|
61
|
+
return dep1;
|
|
62
|
+
}
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments);
|
|
65
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
__setFunctionName(_classThis, "CircularDependencyGraph2");
|
|
69
|
+
(() => {
|
|
70
|
+
var _a;
|
|
71
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
72
|
+
_dep1_decorators = [(0, src_1.Provides)()];
|
|
73
|
+
_dep2_decorators = [(0, src_1.Provides)()];
|
|
74
|
+
_dep3_decorators = [(0, src_1.Provides)()];
|
|
75
|
+
__esDecorate(_classThis, null, _dep1_decorators, { kind: "method", name: "dep1", static: false, private: false, access: { has: obj => "dep1" in obj, get: obj => obj.dep1 }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
76
|
+
__esDecorate(_classThis, null, _dep2_decorators, { kind: "method", name: "dep2", static: false, private: false, access: { has: obj => "dep2" in obj, get: obj => obj.dep2 }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
77
|
+
__esDecorate(_classThis, null, _dep3_decorators, { kind: "method", name: "dep3", static: false, private: false, access: { has: obj => "dep3" in obj, get: obj => obj.dep3 }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
78
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
79
|
+
CircularDependencyGraph2 = _classThis = _classDescriptor.value;
|
|
80
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
81
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
82
|
+
})();
|
|
83
|
+
return CircularDependencyGraph2 = _classThis;
|
|
84
|
+
})();
|
|
25
85
|
exports.CircularDependencyGraph2 = CircularDependencyGraph2;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, src_1.Provides)(),
|
|
28
|
-
__metadata("design:type", Function),
|
|
29
|
-
__metadata("design:paramtypes", [Object]),
|
|
30
|
-
__metadata("design:returntype", void 0)
|
|
31
|
-
], CircularDependencyGraph2.prototype, "dep1", null);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, src_1.Provides)(),
|
|
34
|
-
__metadata("design:type", Function),
|
|
35
|
-
__metadata("design:paramtypes", [Object]),
|
|
36
|
-
__metadata("design:returntype", Object)
|
|
37
|
-
], CircularDependencyGraph2.prototype, "dep2", null);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, src_1.Provides)(),
|
|
40
|
-
__metadata("design:type", Function),
|
|
41
|
-
__metadata("design:paramtypes", [Object]),
|
|
42
|
-
__metadata("design:returntype", Object)
|
|
43
|
-
], CircularDependencyGraph2.prototype, "dep3", null);
|
|
44
|
-
exports.CircularDependencyGraph2 = CircularDependencyGraph2 = __decorate([
|
|
45
|
-
(0, src_1.Graph)()
|
|
46
|
-
], CircularDependencyGraph2);
|
|
47
86
|
//# sourceMappingURL=CircularDependencyGraph2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularDependencyGraph2.js","sourceRoot":"","sources":["../../../test/fixtures/CircularDependencyGraph2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CircularDependencyGraph2.js","sourceRoot":"","sources":["../../../test/fixtures/CircularDependencyGraph2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyD;IAG5C,wBAAwB;4BADpC,IAAA,WAAK,GAAE;;;;sBACsC,iBAAW;;;;;qDAAnB,SAAQ,WAAW;QAEvD,IAAI,CAAC,IAAS;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAGD,IAAI,CAAC,IAAS;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAGD,IAAI,CAAC,IAAS;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;;;YAdU,mDAAwB;;;;;;;4BAClC,IAAA,cAAQ,GAAE;4BAKV,IAAA,cAAQ,GAAE;4BAKV,IAAA,cAAQ,GAAE;QATX,qKAAA,IAAI,6DAEH;QAGD,qKAAA,IAAI,6DAEH;QAGD,qKAAA,IAAI,6DAEH;QAdH,6KAeC;;;QAfY,uDAAwB;;;;AAAxB,4DAAwB"}
|
|
@@ -1,56 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
exports.GraphWithMultipleDependencies = void 0;
|
|
13
42
|
const src_1 = require("../../src");
|
|
14
|
-
let GraphWithMultipleDependencies =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
let GraphWithMultipleDependencies = (() => {
|
|
44
|
+
let _classDecorators = [(0, src_1.Graph)()];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = src_1.ObjectGraph;
|
|
49
|
+
let _instanceExtraInitializers = [];
|
|
50
|
+
let _theDep_decorators;
|
|
51
|
+
let _prefix_decorators;
|
|
52
|
+
let _suffix_decorators;
|
|
53
|
+
let _noopDep_decorators;
|
|
54
|
+
var GraphWithMultipleDependencies = _classThis = class extends _classSuper {
|
|
55
|
+
theDep(prefix, suffix) {
|
|
56
|
+
return prefix + suffix;
|
|
57
|
+
}
|
|
58
|
+
prefix(noopDep) {
|
|
59
|
+
return `prefix${noopDep}`;
|
|
60
|
+
}
|
|
61
|
+
suffix(noopDep) {
|
|
62
|
+
return `Suffix${noopDep}`;
|
|
63
|
+
}
|
|
64
|
+
noopDep() {
|
|
65
|
+
return '';
|
|
66
|
+
}
|
|
67
|
+
constructor() {
|
|
68
|
+
super(...arguments);
|
|
69
|
+
__runInitializers(this, _instanceExtraInitializers);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__setFunctionName(_classThis, "GraphWithMultipleDependencies");
|
|
73
|
+
(() => {
|
|
74
|
+
var _a;
|
|
75
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
76
|
+
_theDep_decorators = [(0, src_1.Provides)()];
|
|
77
|
+
_prefix_decorators = [(0, src_1.Provides)()];
|
|
78
|
+
_suffix_decorators = [(0, src_1.Provides)()];
|
|
79
|
+
_noopDep_decorators = [(0, src_1.Provides)()];
|
|
80
|
+
__esDecorate(_classThis, null, _theDep_decorators, { kind: "method", name: "theDep", static: false, private: false, access: { has: obj => "theDep" in obj, get: obj => obj.theDep }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
81
|
+
__esDecorate(_classThis, null, _prefix_decorators, { kind: "method", name: "prefix", static: false, private: false, access: { has: obj => "prefix" in obj, get: obj => obj.prefix }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
82
|
+
__esDecorate(_classThis, null, _suffix_decorators, { kind: "method", name: "suffix", static: false, private: false, access: { has: obj => "suffix" in obj, get: obj => obj.suffix }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
83
|
+
__esDecorate(_classThis, null, _noopDep_decorators, { kind: "method", name: "noopDep", static: false, private: false, access: { has: obj => "noopDep" in obj, get: obj => obj.noopDep }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
84
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
85
|
+
GraphWithMultipleDependencies = _classThis = _classDescriptor.value;
|
|
86
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
87
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
88
|
+
})();
|
|
89
|
+
return GraphWithMultipleDependencies = _classThis;
|
|
90
|
+
})();
|
|
28
91
|
exports.GraphWithMultipleDependencies = GraphWithMultipleDependencies;
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, src_1.Provides)(),
|
|
31
|
-
__metadata("design:type", Function),
|
|
32
|
-
__metadata("design:paramtypes", [String, String]),
|
|
33
|
-
__metadata("design:returntype", void 0)
|
|
34
|
-
], GraphWithMultipleDependencies.prototype, "theDep", null);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, src_1.Provides)(),
|
|
37
|
-
__metadata("design:type", Function),
|
|
38
|
-
__metadata("design:paramtypes", [String]),
|
|
39
|
-
__metadata("design:returntype", void 0)
|
|
40
|
-
], GraphWithMultipleDependencies.prototype, "prefix", null);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, src_1.Provides)(),
|
|
43
|
-
__metadata("design:type", Function),
|
|
44
|
-
__metadata("design:paramtypes", [String]),
|
|
45
|
-
__metadata("design:returntype", void 0)
|
|
46
|
-
], GraphWithMultipleDependencies.prototype, "suffix", null);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, src_1.Provides)(),
|
|
49
|
-
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", []),
|
|
51
|
-
__metadata("design:returntype", String)
|
|
52
|
-
], GraphWithMultipleDependencies.prototype, "noopDep", null);
|
|
53
|
-
exports.GraphWithMultipleDependencies = GraphWithMultipleDependencies = __decorate([
|
|
54
|
-
(0, src_1.Graph)()
|
|
55
|
-
], GraphWithMultipleDependencies);
|
|
56
92
|
//# sourceMappingURL=GraphWithMultipleDependencies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphWithMultipleDependencies.js","sourceRoot":"","sources":["../../../test/fixtures/GraphWithMultipleDependencies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphWithMultipleDependencies.js","sourceRoot":"","sources":["../../../test/fixtures/GraphWithMultipleDependencies.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyD;IAG5C,6BAA6B;4BADzC,IAAA,WAAK,GAAE;;;;sBAC2C,iBAAW;;;;;;0DAAnB,SAAQ,WAAW;QAE5D,MAAM,CAAC,MAAc,EAAE,MAAc;YACnC,OAAO,MAAM,GAAG,MAAM,CAAC;QACzB,CAAC;QAGD,MAAM,CAAC,OAAe;YACpB,OAAO,SAAS,OAAO,EAAE,CAAC;QAC5B,CAAC;QAGD,MAAM,CAAC,OAAe;YACpB,OAAO,SAAS,OAAO,EAAE,CAAC;QAC5B,CAAC;QAGD,OAAO;YACL,OAAO,EAAE,CAAC;QACZ,CAAC;;;YAnBU,mDAA6B;;;;;;;8BACvC,IAAA,cAAQ,GAAE;8BAKV,IAAA,cAAQ,GAAE;8BAKV,IAAA,cAAQ,GAAE;+BAKV,IAAA,cAAQ,GAAE;QAdX,2KAAA,MAAM,6DAEL;QAGD,2KAAA,MAAM,6DAEL;QAGD,2KAAA,MAAM,6DAEL;QAGD,8KAAA,OAAO,6DAEN;QAnBH,6KAoBC;;;QApBY,uDAA6B;;;;AAA7B,sEAA6B"}
|
|
@@ -1,32 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
3
|
+
var useValue = arguments.length > 2;
|
|
4
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
5
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
6
|
+
}
|
|
7
|
+
return useValue ? value : void 0;
|
|
8
|
+
};
|
|
9
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
10
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
11
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
12
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
13
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
14
|
+
var _, done = false;
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
16
|
+
var context = {};
|
|
17
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
18
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
19
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
20
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
21
|
+
if (kind === "accessor") {
|
|
22
|
+
if (result === void 0) continue;
|
|
23
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
24
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
25
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
26
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
27
|
+
}
|
|
28
|
+
else if (_ = accept(result)) {
|
|
29
|
+
if (kind === "field") initializers.unshift(_);
|
|
30
|
+
else descriptor[key] = _;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
34
|
+
done = true;
|
|
7
35
|
};
|
|
8
|
-
var
|
|
9
|
-
if (typeof
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
10
39
|
};
|
|
11
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
41
|
exports.GraphWithOnBind = void 0;
|
|
13
42
|
const src_1 = require("../../src");
|
|
14
|
-
let GraphWithOnBind =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
43
|
+
let GraphWithOnBind = (() => {
|
|
44
|
+
let _classDecorators = [(0, src_1.Graph)()];
|
|
45
|
+
let _classDescriptor;
|
|
46
|
+
let _classExtraInitializers = [];
|
|
47
|
+
let _classThis;
|
|
48
|
+
let _classSuper = src_1.ObjectGraph;
|
|
49
|
+
let _instanceExtraInitializers = [];
|
|
50
|
+
let _targetName_decorators;
|
|
51
|
+
var GraphWithOnBind = _classThis = class extends _classSuper {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(...arguments);
|
|
54
|
+
this.target = __runInitializers(this, _instanceExtraInitializers);
|
|
55
|
+
}
|
|
56
|
+
onBind(target) {
|
|
57
|
+
this.target = target;
|
|
58
|
+
}
|
|
59
|
+
targetName() {
|
|
60
|
+
return this.target.name;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
__setFunctionName(_classThis, "GraphWithOnBind");
|
|
64
|
+
(() => {
|
|
65
|
+
var _a;
|
|
66
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_a = _classSuper[Symbol.metadata]) !== null && _a !== void 0 ? _a : null) : void 0;
|
|
67
|
+
_targetName_decorators = [(0, src_1.Provides)()];
|
|
68
|
+
__esDecorate(_classThis, null, _targetName_decorators, { kind: "method", name: "targetName", static: false, private: false, access: { has: obj => "targetName" in obj, get: obj => obj.targetName }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
69
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
70
|
+
GraphWithOnBind = _classThis = _classDescriptor.value;
|
|
71
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
72
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
73
|
+
})();
|
|
74
|
+
return GraphWithOnBind = _classThis;
|
|
75
|
+
})();
|
|
22
76
|
exports.GraphWithOnBind = GraphWithOnBind;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, src_1.Provides)(),
|
|
25
|
-
__metadata("design:type", Function),
|
|
26
|
-
__metadata("design:paramtypes", []),
|
|
27
|
-
__metadata("design:returntype", String)
|
|
28
|
-
], GraphWithOnBind.prototype, "targetName", null);
|
|
29
|
-
exports.GraphWithOnBind = GraphWithOnBind = __decorate([
|
|
30
|
-
(0, src_1.Graph)()
|
|
31
|
-
], GraphWithOnBind);
|
|
32
77
|
//# sourceMappingURL=GraphWithOnBind.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphWithOnBind.js","sourceRoot":"","sources":["../../../test/fixtures/GraphWithOnBind.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GraphWithOnBind.js","sourceRoot":"","sources":["../../../test/fixtures/GraphWithOnBind.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyD;IAG5C,eAAe;4BAD3B,IAAA,WAAK,GAAE;;;;sBAC6B,iBAAW;;;4CAAnB,SAAQ,WAAW;;;YACtC,WAAM,GADH,mDAAe,CACL;QAUvB,CAAC;QARU,MAAM,CAAC,MAAW;YACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC;QAGD,UAAU;YACR,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1B,CAAC;;;;;;kCAHA,IAAA,cAAQ,GAAE;QACX,uLAAA,UAAU,6DAET;QAVH,6KAWC;;;QAXY,uDAAe;;;;AAAf,0CAAe"}
|