mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 04:30:04 +00:00
[chore] Clean up ignores after strict mode enabled (#680)
- Replaces all `ts-ignore` with `ts-expect-error` - Resolves https://github.com/Comfy-Org/litegraph.js/issues/578
This commit is contained in:
@@ -157,7 +157,7 @@ export class ComboWidget extends BaseWidget implements IComboWidget {
|
||||
// @ts-expect-error handle () => string[] type that is not typed in IWidgetOptions
|
||||
values = values(this, node)
|
||||
}
|
||||
// @ts-ignore Record<string, string> is not typed in IWidgetOptions
|
||||
// @ts-expect-error Record<string, string> is not typed in IWidgetOptions
|
||||
const values_list = Array.isArray(values) ? values : Object.keys(values)
|
||||
|
||||
// Handle left/right arrow clicks
|
||||
@@ -187,7 +187,7 @@ export class ComboWidget extends BaseWidget implements IComboWidget {
|
||||
}
|
||||
|
||||
// Handle center click - show dropdown menu
|
||||
// @ts-ignore Record<string, string> is not typed in IWidgetOptions
|
||||
// @ts-expect-error Record<string, string> is not typed in IWidgetOptions
|
||||
const text_values = values != values_list ? Object.values(values) : values
|
||||
new LiteGraph.ContextMenu(text_values, {
|
||||
scale: Math.max(1, canvas.ds.scale),
|
||||
|
||||
@@ -14,20 +14,20 @@ type WidgetConstructor = {
|
||||
}
|
||||
|
||||
export const WIDGET_TYPE_MAP: Record<string, WidgetConstructor> = {
|
||||
// @ts-ignore https://github.com/Comfy-Org/litegraph.js/issues/616
|
||||
// @ts-expect-error https://github.com/Comfy-Org/litegraph.js/issues/616
|
||||
button: ButtonWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
toggle: BooleanWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
slider: SliderWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
knob: KnobWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
combo: ComboWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
number: NumberWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
string: TextWidget,
|
||||
// @ts-ignore #616
|
||||
// @ts-expect-error #616
|
||||
text: TextWidget,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user