[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

@@ -300,7 +300,7 @@ export class LGraphGroup implements Positionable, IPinnable, IColorable {
this.resizeTo([...this.children, ...this._nodes, ...nodes], padding)
}
getMenuOptions(): (IContextMenuValue | null)[] {
getMenuOptions(): (IContextMenuValue<string> | null)[] {
return [
{
content: this.pinned ? "Unpin" : "Pin",