From daa55f805b716e5888eba5fd0b4c351295d19c23 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Sat, 21 Nov 2020 20:56:44 +0800 Subject: [PATCH] types: fix errors --- src/uploader/utils.ts | 2 +- test/event.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uploader/utils.ts b/src/uploader/utils.ts index c3190814759..b371600bc60 100644 --- a/src/uploader/utils.ts +++ b/src/uploader/utils.ts @@ -9,7 +9,7 @@ export function toArray(item: T | T[]): T[] { } export function readFileContent(file: File, resultType: ResultType) { - return new Promise((resolve) => { + return new Promise((resolve) => { if (resultType === 'file') { resolve(); return; diff --git a/test/event.ts b/test/event.ts index 2d923babdc2..d85c38fd9c9 100644 --- a/test/event.ts +++ b/test/event.ts @@ -1,7 +1,7 @@ import { ComponentPublicInstance } from 'vue'; import { VueWrapper } from '@vue/test-utils'; -function getTouch(el: HTMLElement | Window, x: number, y: number) { +function getTouch(el: Element | Window, x: number, y: number) { return { identifier: Date.now(), target: el, @@ -47,7 +47,7 @@ export function trigger( // simulate drag gesture export function triggerDrag( - el: Wrapper | HTMLElement, + el: VueWrapper | HTMLElement, x = 0, y = 0 ): void {