mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 23:50:00 +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:
@@ -48,6 +48,11 @@ export interface LGraphConfig {
|
||||
links_ontop?: any
|
||||
}
|
||||
|
||||
export interface LGraphExtra extends Dictionary<unknown> {
|
||||
reroutes?: SerialisableReroute[]
|
||||
linkExtensions?: { id: number, parentId: number | undefined }[]
|
||||
}
|
||||
|
||||
export interface BaseLGraph {
|
||||
readonly rootGraph: LGraph
|
||||
}
|
||||
@@ -119,7 +124,7 @@ export class LGraph implements LinkNetwork, BaseLGraph, Serialisable<Serialisabl
|
||||
nodes_executing: boolean[] = []
|
||||
nodes_actioning: (string | boolean)[] = []
|
||||
nodes_executedAction: string[] = []
|
||||
extra: Record<string, unknown> = {}
|
||||
extra: LGraphExtra = {}
|
||||
|
||||
/** @deprecated Deserialising a workflow sets this unused property. */
|
||||
version?: number
|
||||
|
||||
Reference in New Issue
Block a user