whale-plus
Version:
A Component Library for Vue 3
16 lines (15 loc) • 641 B
TypeScript
import type { RequestStrategy } from './RequestStrategy';
import type { Chunk } from './split/FileChunk';
import type { EventEmitter } from '../upload-core/EventEmitter';
export declare class TestRequest implements RequestStrategy {
createFile(file: File): Promise<string>;
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;
}>;
uploadChunk(chunk: Chunk, emitter: EventEmitter<'progress' | 'end'>): Promise<void>;
}