mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-11 08:00:21 +00:00
[TS] Force explicit override & property access (#1006)
Enables TypeScript rules that improve code legibility.
- Requires `override` keyword
- Prevent indexed properties from being accessed with dot notation
```ts
const obj: Record<string, unknown> = {}
// Prefer
obj["property"]
// Over
obj.property
```
This commit is contained in:
@@ -8,7 +8,7 @@ import type {
|
||||
Point,
|
||||
Size,
|
||||
} from "../interfaces"
|
||||
import type { LGraphConfig, LGraphState } from "../LGraph"
|
||||
import type { LGraphConfig, LGraphExtra, LGraphState } from "../LGraph"
|
||||
import type { IGraphGroupFlags } from "../LGraphGroup"
|
||||
import type { NodeId, NodeProperty } from "../LGraphNode"
|
||||
import type { LiteGraph } from "../litegraph"
|
||||
@@ -53,7 +53,7 @@ export interface SerialisableGraph extends BaseExportedGraph {
|
||||
links?: SerialisableLLink[]
|
||||
floatingLinks?: SerialisableLLink[]
|
||||
reroutes?: SerialisableReroute[]
|
||||
extra?: Dictionary<unknown>
|
||||
extra?: LGraphExtra
|
||||
}
|
||||
|
||||
export type ISerialisableNodeInput = Omit<INodeInputSlot, "boundingRect" | "widget"> & {
|
||||
@@ -114,9 +114,7 @@ export interface ISerialisedGraph extends BaseExportedGraph {
|
||||
floatingLinks?: SerialisableLLink[]
|
||||
groups: ISerialisedGroup[]
|
||||
version: typeof LiteGraph.VERSION
|
||||
extra?: Dictionary<unknown> & {
|
||||
reroutes?: SerialisableReroute[]
|
||||
}
|
||||
extra?: LGraphExtra
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user