[CodeHealth] Apply modern standards to LGraphCanvas (#650)

- Prefer template string
- Prefer explicit throw to undefined TypeError
- Remove unnecessary `this` assignment
This commit is contained in:
filtered
2025-03-01 09:08:23 +11:00
committed by GitHub
parent c4faaf4210
commit b36bf3d4a2
10 changed files with 102 additions and 127 deletions

View File

@@ -9,7 +9,7 @@ import type {
} from "../interfaces"
import type { LGraph, LGraphState } from "../LGraph"
import type { IGraphGroupFlags, LGraphGroup } from "../LGraphGroup"
import type { LGraphNode, NodeId } from "../LGraphNode"
import type { LGraphNode, NodeId, NodeProperty } from "../LGraphNode"
import type { LiteGraph } from "../litegraph"
import type { LinkId, LLink } from "../LLink"
import type { RerouteId } from "../Reroute"
@@ -57,7 +57,7 @@ export interface ISerialisedNode {
mode?: number
outputs?: ISerialisedNodeOutputSlot[]
inputs?: ISerialisedNodeInputSlot[]
properties?: Dictionary<unknown>
properties?: Dictionary<NodeProperty | undefined>
shape?: RenderShape
boxcolor?: string
color?: string