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

Method notifyGot

packages/editor-core/src/editor.ts:312–330  ·  view source on GitHub ↗
(key: IPublicTypeEditorValueKey)

Source from the content-addressed store, hash-verified

310 };
311
312 private notifyGot(key: IPublicTypeEditorValueKey) {
313 let waits = this.waits.get(key);
314 if (!waits) {
315 return;
316 }
317 waits = waits.slice().reverse();
318 let i = waits.length;
319 while (i--) {
320 waits[i].resolve(this.get(key));
321 if (waits[i].once) {
322 waits.splice(i, 1);
323 }
324 }
325 if (waits.length > 0) {
326 this.waits.set(key, waits);
327 } else {
328 this.waits.delete(key);
329 }
330 }
331
332 private setWait(key: IPublicTypeEditorValueKey, resolve: (data: any) => void, once?: boolean) {
333 const waits = this.waits.get(key);

Callers 3

setMethod · 0.95
setAssetsMethod · 0.95
registerMethod · 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