UNPKG

943 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Request = void 0;
4const id_1 = require("../utils/id");
5class Request {
6 constructor(serviceIdentifier, parentContext, parentRequest, bindings, target) {
7 this.id = (0, id_1.id)();
8 this.serviceIdentifier = serviceIdentifier;
9 this.parentContext = parentContext;
10 this.parentRequest = parentRequest;
11 this.target = target;
12 this.childRequests = [];
13 this.bindings = (Array.isArray(bindings) ? bindings : [bindings]);
14 this.requestScope = parentRequest === null
15 ? new Map()
16 : null;
17 }
18 addChildRequest(serviceIdentifier, bindings, target) {
19 const child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);
20 this.childRequests.push(child);
21 return child;
22 }
23}
24exports.Request = Request;
25//# sourceMappingURL=request.js.map
\No newline at end of file