MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / getInstance

Method getInstance

ai/ai.ts:1568–1580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1566
1567 static getInstance(): Promise<ConfigManager> {
1568 if (ConfigManager.instancePromise) {
1569 return ConfigManager.instancePromise;
1570 }
1571
1572 ConfigManager.instancePromise = (async () => {
1573 const instance = new ConfigManager();
1574 await instance.init();
1575 return instance;
1576 })();
1577
1578 return ConfigManager.instancePromise;
1579 }
1580
1581 private async init(): Promise<void> {
1582 if (this.db) return;
1583

Callers 1

constructorMethod · 0.45

Calls 1

initMethod · 0.95

Tested by

no test coverage detected