Files
pnpm/src/fetchTypes.ts
Zoltan Kochan 307bd951f0 feat: init
2017-12-04 23:20:38 +02:00

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>