235
// check all dependencies for existence and if they need to be created first
236
for (const dependency of _util.getServiceDependencies(item.desc.ctor)) {
238
>
const instanceOrDesc = this._getServiceInstanceOrDescriptor(dependency.id);
239
>
if (!instanceOrDesc) {
240
this._throwIfStrict(`[createInstance] ${id} depends on ${dependency.id} which is NOT registered.`, true);
241
}
243
>
// take note of all service dependencies
244
>
this._globalGraph?.insertEdge(String(item.id), String(dependency.id));
245
>
246
>
if (instanceOrDesc instanceof SyncDescriptor) {
247
>
const d = { id: dependency.id, desc: instanceOrDesc, _trace: item._trace.branch(dependency.id, true) };
248
>
graph.insertEdge(item, d);
249
>
stack.push(d);
250
>
}
251
>
}
252
}
253