UNPKG

whale-plus

Version:

A Component Library for Vue 3

15 lines (14 loc) 556 B
import type { EventEmitter } from '../upload-core/EventEmitter'; import type { Chunk } from './split/FileChunk'; export interface RequestStrategy { createFile(file: File): Promise<string>; uploadChunk(chunk: Chunk, emitter: EventEmitter<'progress' | 'end'>): Promise<void>; mergeFile(token: string): Promise<string>; patchHash<T extends 'file' | 'chunk'>(token: string, hash: string, type: T): Promise<T extends 'file' ? { hasFile: boolean; } : { hasFile: boolean; rest: number[]; url: string; }>; }