# @types/unzip

> TypeScript definitions for unzip

Latest version **0.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/unzip
pnpm add @types/unzip
yarn add @types/unzip
bun add @types/unzip
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-11-07 |
| First published | 2017-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51464 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/unzip
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unzip
- npm.io page: https://npm.io/package/@types/unzip

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.1.4 (latest) — 2023-11-07
- 0.1.2 (ts4.3) — 2023-08-30
- 0.1.1 (ts2.0) — 2018-05-31
- 0.1.3 — 2023-10-18
- 0.1.0 — 2017-11-15

## README

# Installation
> `npm install --save @types/unzip`

# Summary
This package contains type definitions for unzip (https://github.com/EvanOxfeld/node-unzip).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unzip.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unzip/index.d.ts)
````ts
/// <reference types="node" />

import stream = require("stream");

export function Extract(options: { path: string }): NodeJS.WritableStream;
export function Parse(): NodeJS.WritableStream;

/**
 * Code example from https://www.npmjs.com/package/unzip with type unzip.Entry added
 * ```
 * fs.createReadStream('path/to/archive.zip')
 *  .pipe(unzip.Parse())
 *  .on('entry', function (entry: unzip.Entry) {
 *    var fileName = entry.path;
 *    var type = entry.type; // 'Directory' or 'File'
 *    var size = entry.size;
 *    if (fileName === "this IS the file I'm looking for") {
 *      entry.pipe(fs.createWriteStream('output/path'));
 *    } else {
 *      entry.autodrain();
 *    }
 *  });
 * ```
 */
export interface Entry extends stream.PassThrough {
    path: string;
    type: "Directory" | "File";
    size: number;
    autodrain: () => void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Ravi L.](https://github.com/coding2012).

---
_Source: https://npm.io/package/@types/unzip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
