From effe937e144d92e060b2141955a23c5765d28998 Mon Sep 17 00:00:00 2001 From: Lucas Nascimento Date: Thu, 28 Jan 2021 00:25:11 -0300 Subject: [PATCH] TS support about LGraphNode.onPropertyChanged --- src/litegraph.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/litegraph.d.ts b/src/litegraph.d.ts index 9d3d37c029..a7249c3a02 100644 --- a/src/litegraph.d.ts +++ b/src/litegraph.d.ts @@ -1003,6 +1003,15 @@ export declare class LGraphNode { ioSlot: (INodeOutputSlot | INodeInputSlot) ): void; + /** + * if returns false, will abort the `LGraphNode.setProperty` + * Called when a property is changed + * @param property + * @param value + * @param prevValue + */ + onPropertyChanged?(property: string, value: any, prevValue: any): void | boolean; + /** Called by `LGraphCanvas.processContextMenu` */ getMenuOptions?(graphCanvas: LGraphCanvas): ContextMenuItem[]; getSlotMenuOptions?(slot: INodeSlot): ContextMenuItem[];