mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-25 00:39:49 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user