DefinitelyTyped/types/pacote/extract.d.ts
Joel Spadin 25fe77861d Add types npm-registry-fetch, libnpmsearch, and pacote (#38376)
* Add types for npm-registry-fetch

* Add types for libnpmsearch

* Add types for pacote

* Use ReadonlyArray in libnpmsearch

* pacote: Reorganize imports/exports
2019-09-25 09:37:07 -07:00

13 lines
475 B
TypeScript

import { Options } from './index';
/**
* Extracts package data identified by `spec` into a directory named
* `destination`, which will be created if it does not already exist.
*
* If `opts.digest` is provided and the data it identifies is present in the
* cache, `extract` will bypass most of its operations and go straight to
* extracting the tarball.
*/
declare function extract(spec: string, destination?: string, opts?: Options): Promise<void>;
export = extract;