MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / createInstance

Method createInstance

src/services/mdm/MdmService.ts:179–187  ·  view source on GitHub ↗

* Create and initialize the singleton instance

(log?: (...args: unknown[]) => void)

Source from the content-addressed store, hash-verified

177 * Create and initialize the singleton instance
178 */
179 public static async createInstance(log?: (...args: unknown[]) => void): Promise<MdmService> {
180 if (this._instance) {
181 throw new Error("MdmService instance already exists")
182 }
183
184 this._instance = new MdmService(log)
185 await this._instance.initialize()
186 return this._instance
187 }
188
189 /**
190 * Check if instance exists

Calls 1

initializeMethod · 0.65

Tested by

no test coverage detected