# @types/yazl

> TypeScript definitions for yazl

Latest version **3.3.1** (published 2026-04-07) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 65/100 (B)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.3.1 |
| Published | 2026-04-07 |
| First published | 2018-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 3.3.1 (latest) — 2026-04-07
- 3.3.0 (ts5.2) — 2025-05-21
- 2.4.6 (ts5.0) — 2025-02-04
- 2.4.5 (ts4.5) — 2023-11-07
- 2.4.2 (ts2.2) — 2019-09-25
- 2.4.4 — 2023-10-18
- 2.4.3 — 2023-09-25
- 2.4.1 — 2018-10-30
- 2.4.0 — 2018-03-23

## README

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

import { Buffer } from "buffer";
import { EventEmitter } from "events";

export interface Options {
    mtime: Date;
    mode: number;
    compress: boolean;
    forceZip64Format: boolean;
    forceDosTimestamp: boolean;
    compressionLevel: number;
}

export interface FileOptions extends Options {
    fileComment: string;
}

export interface ReadStreamOptions extends FileOptions {
    size: number;
}

export interface DirectoryOptions {
    mtime: Date;
    mode: number;
    forceDosTimestamp: boolean;
}

export interface EndOptions {
    forceZip64Format: boolean;
    comment: string;
}

export interface DosDateTime {
    date: number;
    time: number;
}

export class ZipFile extends EventEmitter {
    addFile(realPath: string, metadataPath: string, options?: Partial<FileOptions>): void;
    outputStream: NodeJS.ReadableStream;
    addReadStream(input: NodeJS.ReadableStream, metadataPath: string, options?: Partial<ReadStreamOptions>): void;
    addReadStreamLazy(
        metadataPath: string,
        getReadStreamFunction: (cb: (err: any, readStream: NodeJS.ReadableStream) => void) => void,
    ): void;
    addReadStreamLazy(
        metadataPath: string,
        options: Partial<ReadStreamOptions>,
        getReadStreamFunction: (cb: (err: any, readStream: NodeJS.ReadableStream) => void) => void,
    ): void;
    addBuffer(buffer: Buffer, metadataPath: string, options?: Partial<Options>): void;
    end(options?: EndOptions, calculatedTotalSizeCallback?: () => void): void;

    addEmptyDirectory(metadataPath: string, options?: Partial<DirectoryOptions>): void;

    /**
     * @deprecated since yazl 3.3.0
     */
    dateToDosDateTime(jsDate: Date): DosDateTime;
}

````

### Additional Details
 * Last updated: Tue, 07 Apr 2026 22:11:24 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [taoqf](https://github.com/taoqf), and [Sean Marvi Oliver Genabe](https://github.com/seangenabe).

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