mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-03 21:44:52 -04:00
17 lines
431 B
TypeScript
17 lines
431 B
TypeScript
import * as unpackStream from 'unpack-stream'
|
|
import {Resolution} from './resolveTypes'
|
|
|
|
export interface FetchOptions {
|
|
cachedTarballLocation: string,
|
|
pkgId: string,
|
|
prefix: string,
|
|
onStart?: (totalSize: number | null, attempt: number) => void,
|
|
onProgress?: (downloaded: number) => void,
|
|
}
|
|
|
|
export type FetchFunction = (
|
|
resolution: Resolution,
|
|
target: string,
|
|
opts: FetchOptions,
|
|
) => Promise<unpackStream.Index>
|