[TS] Fix ContextMenu types (#649)

- No runtime changes
- Drastically improves ContextMenu type accuracy / safety
- Allows TS strict conversion
This commit is contained in:
filtered
2025-03-01 01:52:07 +11:00
committed by GitHub
parent b877312336
commit c4faaf4210
6 changed files with 92 additions and 82 deletions

View File

@@ -46,7 +46,7 @@ export type ContextMenuEventListener = (
value: IContextMenuItem,
options: IContextMenuOptions,
event: MouseEvent,
parentMenu: ContextMenu | undefined,
parentMenu: ContextMenu<unknown> | undefined,
node: LGraphNode,
) => boolean | void