TS support about LGraphNode.onPropertyChanged

This commit is contained in:
Lucas Nascimento
2021-01-28 00:25:11 -03:00
parent e6147b7217
commit effe937e14

9
src/litegraph.d.ts vendored
View File

@@ -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[];