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

Method onceGot

packages/editor-core/src/editor.ts:211–219  ·  view source on GitHub ↗
(keyOrType: KeyOrType)

Source from the content-addressed store, hash-verified

209 }
210
211 onceGot<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>(keyOrType: KeyOrType): Promise<IPublicTypeEditorGetResult<T, KeyOrType>> {
212 const x = this.context.get(keyOrType);
213 if (x !== undefined) {
214 return Promise.resolve(x);
215 }
216 return new Promise((resolve) => {
217 this.setWait(keyOrType, resolve, true);
218 });
219 }
220
221 onGot<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>(
222 keyOrType: KeyOrType,

Callers

nothing calls this directly

Calls 3

setWaitMethod · 0.95
resolveMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected