fix(types): remove @ts-expect-error suppressions from src/scripts

This commit is contained in:
DrJKL
2026-01-12 09:59:36 -08:00
parent 168af5310b
commit 1b4dd57d32
19 changed files with 303 additions and 353 deletions

View File

@@ -2,21 +2,17 @@ import { $el } from '../../ui'
import { ComfyDialog } from '../dialog'
export class ComfyAsyncDialog extends ComfyDialog<HTMLDialogElement> {
// @ts-expect-error fixme ts strict error
#resolve: (value: any) => void
#resolve!: (value: any) => void
constructor(actions?: Array<string | { value?: any; text: string }>) {
super(
'dialog.comfy-dialog.comfyui-dialog',
// @ts-expect-error fixme ts strict error
actions?.map((opt) => {
if (typeof opt === 'string') {
opt = { text: opt }
}
const option = typeof opt === 'string' ? { text: opt } : opt
return $el('button.comfyui-button', {
type: 'button',
textContent: opt.text,
onclick: () => this.close(opt.value ?? opt.text)
textContent: option.text,
onclick: () => this.close(option.value ?? option.text)
})
})
)