MCPcopy
hub / github.com/codeaashu/claude-code / createInstance

Method createInstance

src/server/web/public/terminal.js:5637–5647  ·  view source on GitHub ↗
(e3, ...t3)

Source from the content-addressed store, hash-verified

5635 this._services.set(e3, t3);
5636 }
5637 getService(e3) {
5638 return this._services.get(e3);
5639 }
5640 createInstance(e3, ...t3) {
5641 const i3 = (0, r.getServiceDependencies)(e3).sort(((e4, t4) => e4.index - t4.index)), s3 = [];
5642 for (const t4 of i3) {
5643 const i4 = this._services.get(t4.id);
5644 if (!i4) throw new Error(`[createInstance] ${e3.name} depends on UNKNOWN service ${t4.id}.`);
5645 s3.push(i4);
5646 }
5647 const n2 = i3.length > 0 ? i3[0].index : t3.length;
5648 if (t3.length !== n2) throw new Error(`[createInstance] First service dependency of ${e3.name} at position ${n2 + 1} conflicts with ${t3.length} static arguments`);
5649 return new e3(...[...t3, ...s3]);
5650 }

Callers 6

constructorMethod · 0.45
openMethod · 0.45
_createRendererMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45

Calls 2

getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected