mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-03 20:51:58 +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:
@@ -6033,7 +6033,7 @@ export class LGraphCanvas {
|
||||
dialog.close()
|
||||
} else if (e.key == "Enter") {
|
||||
if (selected instanceof HTMLElement) {
|
||||
select(unescape(String(selected.dataset.type)))
|
||||
select(unescape(String(selected.dataset["type"])))
|
||||
} else if (first) {
|
||||
select(first)
|
||||
} else {
|
||||
@@ -6395,7 +6395,7 @@ export class LGraphCanvas {
|
||||
help.className += ` ${className}`
|
||||
}
|
||||
help.addEventListener("click", function () {
|
||||
select(unescape(String(this.dataset.type)))
|
||||
select(unescape(String(this.dataset["type"])))
|
||||
})
|
||||
helper.append(help)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user