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

Function _innerWaitForThing

packages/utils/src/misc.ts:41–54  ·  view source on GitHub ↗
(obj: any, path: string)

Source from the content-addressed store, hash-verified

39}
40
41function _innerWaitForThing(obj: any, path: string): Promise<any> {
42 const timeGap = 200;
43 return new Promise((resolve, reject) => {
44 setTimeout(() => {
45 const thing = get(obj, path);
46 if (thing) {
47 return resolve(thing);
48 }
49 reject();
50 }, timeGap);
51 }).catch(() => {
52 return _innerWaitForThing(obj, path);
53 });
54}
55
56export function waitForThing(obj: any, path: string): Promise<any> {
57 const thing = get(obj, path);

Callers 1

waitForThingFunction · 0.85

Calls 1

getFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…