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

Method onGot

packages/editor-core/src/editor.ts:221–233  ·  view source on GitHub ↗
(
    keyOrType: KeyOrType,
    fn: (data: IPublicTypeEditorGetResult<T, KeyOrType>) => void,
  )

Source from the content-addressed store, hash-verified

219 }
220
221 onGot<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>(
222 keyOrType: KeyOrType,
223 fn: (data: IPublicTypeEditorGetResult<T, KeyOrType>) => void,
224 ): () => void {
225 const x = this.context.get(keyOrType);
226 if (x !== undefined) {
227 fn(x);
228 }
229 this.setWait(keyOrType, fn);
230 return () => {
231 this.delWait(keyOrType, fn);
232 };
233 }
234
235 onChange<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>(
236 keyOrType: KeyOrType,

Callers

nothing calls this directly

Calls 3

setWaitMethod · 0.95
delWaitMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected