MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / notifyGot

Method notifyGot

packages/editor-core/src/config.ts:322–340  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

320 }
321
322 notifyGot(key: string): void {
323 let waits = this.waits.get(key);
324 if (!waits) {
325 return;
326 }
327 waits = waits.slice().reverse();
328 let i = waits.length;
329 while (i--) {
330 waits[i].resolve(this.get(key));
331 if (waits[i].once) {
332 waits.splice(i, 1);
333 }
334 }
335 if (waits.length > 0) {
336 this.waits.set(key, waits);
337 } else {
338 this.waits.delete(key);
339 }
340 }
341
342 setWait(key: string, resolve: (data: any) => void, once?: boolean) {
343 const waits = this.waits.get(key);

Callers 1

setMethod · 0.95

Calls 7

getMethod · 0.95
resolveMethod · 0.80
getMethod · 0.65
reverseMethod · 0.65
spliceMethod · 0.65
setMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected