types: fix errors

This commit is contained in:
chenjiahan 2020-11-21 20:56:44 +08:00
parent c57f4a80b4
commit daa55f805b
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ export function toArray<T>(item: T | T[]): T[] {
} }
export function readFileContent(file: File, resultType: ResultType) { export function readFileContent(file: File, resultType: ResultType) {
return new Promise((resolve) => { return new Promise<string | ArrayBuffer | null | undefined>((resolve) => {
if (resultType === 'file') { if (resultType === 'file') {
resolve(); resolve();
return; return;

View File

@ -1,7 +1,7 @@
import { ComponentPublicInstance } from 'vue'; import { ComponentPublicInstance } from 'vue';
import { VueWrapper } from '@vue/test-utils'; 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 { return {
identifier: Date.now(), identifier: Date.now(),
target: el, target: el,
@ -47,7 +47,7 @@ export function trigger(
// simulate drag gesture // simulate drag gesture
export function triggerDrag( export function triggerDrag(
el: Wrapper<Vue> | HTMLElement, el: VueWrapper<ComponentPublicInstance> | HTMLElement,
x = 0, x = 0,
y = 0 y = 0
): void { ): void {