UNPKG

891 BJavaScriptView Raw
1import { id } from "../utils/id";
2var Request = (function () {
3 function Request(serviceIdentifier, parentContext, parentRequest, bindings, target) {
4 this.id = id();
5 this.serviceIdentifier = serviceIdentifier;
6 this.parentContext = parentContext;
7 this.parentRequest = parentRequest;
8 this.target = target;
9 this.childRequests = [];
10 this.bindings = (Array.isArray(bindings) ? bindings : [bindings]);
11 this.requestScope = parentRequest === null
12 ? new Map()
13 : null;
14 }
15 Request.prototype.addChildRequest = function (serviceIdentifier, bindings, target) {
16 var child = new Request(serviceIdentifier, this.parentContext, this, bindings, target);
17 this.childRequests.push(child);
18 return child;
19 };
20 return Request;
21}());
22export { Request };
23//# sourceMappingURL=request.js.map
\No newline at end of file