-
Notifications
You must be signed in to change notification settings - Fork 0
/
di-cycle.js
57 lines (46 loc) · 1.52 KB
/
di-cycle.js
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
'use strict';
module.exports = {
_map: {},
/**
* @returns {YourFunkyDependency1}
*/
get YourFunkyDependency1() {
if (!this._map.YourFunkyDependency1) {
const YourFunkyDependency1 = require('./tests/services-w-cycle/YourFunkyDependency1');
YourFunkyDependency1.constructor(this.YourFunkyService2);
this._map.YourFunkyDependency1 = YourFunkyDependency1;
}
return this._map.YourFunkyDependency1;
},
/**
* @returns {YourFunkyDependency2}
*/
get YourFunkyDependency2() {
if (!this._map.YourFunkyDependency2) {
const YourFunkyDependency2 = require('./tests/services-w-cycle/YourFunkyDependency2');
this._map.YourFunkyDependency2 = new YourFunkyDependency2();
}
return this._map.YourFunkyDependency2;
},
/**
* @returns {YourFunkyService1}
*/
get YourFunkyService1() {
if (!this._map.YourFunkyService1) {
const YourFunkyService1 = require('./tests/services-w-cycle/YourFunkyService1');
this._map.YourFunkyService1 = new YourFunkyService1(this.YourFunkyDependency1, this.YourFunkyDependency2);
}
return this._map.YourFunkyService1;
},
/**
* @returns {YourFunkyService2}
*/
get YourFunkyService2() {
if (!this._map.YourFunkyService2) {
const YourFunkyService2 = require('./tests/services-w-cycle/YourFunkyService2');
YourFunkyService2.constructor(this.YourFunkyDependency1, this.YourFunkyDependency2);
this._map.YourFunkyService2 = YourFunkyService2;
}
return this._map.YourFunkyService2;
},
};