Skip to content

fetch download.Function.fetchDownload

github-actions[bot] edited this page Jun 8, 2026 · 2 revisions

@zenstone/ts-utils / fetch-download / fetchDownload

Function: fetchDownload()

fetchDownload<T, R>(input): R

Defined in: src/fetch-download/fetchDownload.ts:18

创建 DownloadTaskDownloadQueue 的快捷方法

// DownloadTask
const task = fetchDownload('url');

// DownloadQueue
const queue = fetchDownload(['url-a', 'url-b', 'url-c']);

Type Parameters

T

T extends DownloadInput | DownloadInput[]

R

R = T extends DownloadInput ? DownloadTask : DownloadQueue

Parameters

input

T

Returns

R

Clone this wiki locally