fix(types): remove @ts-expect-error in schemas, stores, and workbench

Amp-Thread-ID: https://ampcode.com/threads/T-019bafc7-9674-769c-bfea-dd60aa6c47a7
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
DrJKL
2026-01-11 17:24:52 -08:00
parent 0590557e44
commit 4fd516750a
6 changed files with 64 additions and 76 deletions

View File

@@ -37,8 +37,7 @@ describe('imagePreviewStore getPreviewParam', () => {
it('should return empty string if node.animatedImages is true', () => {
const store = useNodeOutputStore()
// @ts-expect-error `animatedImages` property is not typed
const node = createMockNode({ animatedImages: true })
const node = Object.assign(createMockNode(), { animatedImages: true })
const outputs = createMockOutputs([{ filename: 'img.png' }])
expect(store.getPreviewParam(node, outputs)).toBe('')
expect(vi.mocked(app).getPreviewFormatParam).not.toHaveBeenCalled()

View File

@@ -31,14 +31,11 @@ export const useSearchBoxStore = defineStore('searchBox', () => {
return
}
if (!popoverRef.value) return
popoverRef.value.showSearchBox(
new MouseEvent('click', {
clientX: x.value,
clientY: y.value,
// @ts-expect-error layerY is a nonstandard property
layerY: y.value
}) as unknown as CanvasPointerEvent
const event = Object.assign(
new MouseEvent('click', { clientX: x.value, clientY: y.value }),
{ layerY: y.value }
)
popoverRef.value.showSearchBox(event as unknown as CanvasPointerEvent)
}
return {