MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / onChange

Method onChange

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

Source from the content-addressed store, hash-verified

233 }
234
235 onChange<T = undefined, KeyOrType extends IPublicTypeEditorValueKey = any>(
236 keyOrType: KeyOrType,
237 fn: (data: IPublicTypeEditorGetResult<T, KeyOrType>) => void,
238 ): () => void {
239 this.setWait(keyOrType, fn);
240 return () => {
241 this.delWait(keyOrType, fn);
242 };
243 }
244
245 register(data: any, key?: IPublicTypeEditorValueKey): void {
246 this.context.set(key || data, data);

Callers

nothing calls this directly

Calls 2

setWaitMethod · 0.95
delWaitMethod · 0.95

Tested by

no test coverage detected