@beenotung/tslib
Version:
utils library in Typescript
18 lines (17 loc) • 492 B
TypeScript
/**
* For Node
* */
import { FetchWithRetryOptions } from './fetch';
export type Options = {
url: string;
file: string;
onProgress?: (progress: Progress) => void;
};
type Progress = {
total?: number;
current: number;
chunk: number;
};
export declare function download_file(url: string, file: string, onProgress?: (progress: Progress) => void): Promise<void>;
export declare function download_file(options: Options & FetchWithRetryOptions): Promise<void>;
export {};