[TS] Use strict mode in LGraphNode - initial (#598)

- Part of effort to convert LGraphNode to TS strict
- Adds some small runtime changes - no impact expected, but it is
possible
- Runtime changes are in separate commits from compile-time type changes
- Risk of downstream impact is low
This commit is contained in:
filtered
2025-02-26 04:19:27 +11:00
committed by GitHub
parent 0b84ca83d8
commit 4636367de2
7 changed files with 41 additions and 25 deletions

View File

@@ -35,7 +35,7 @@ export class ContextMenu {
* - ignore_item_callbacks: ignores the callback inside the item, it just calls the options.callback
* - event: you can pass a MouseEvent, this way the ContextMenu appears in that position
*/
constructor(values: (IContextMenuValue | string)[], options: IContextMenuOptions) {
constructor(values: (IContextMenuValue | string | null)[], options: IContextMenuOptions) {
options ||= {}
this.options = options