# @types/tar-fs

> TypeScript definitions for tar-fs

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

## Install

```sh
npm install @types/tar-fs
pnpm add @types/tar-fs
yarn add @types/tar-fs
bun add @types/tar-fs
```

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2023-11-07 |
| First published | 2018-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 2.0.4 (latest) — 2023-11-07
- 2.0.2 (ts4.3) — 2023-09-12
- 2.0.1 (ts3.6) — 2021-07-02
- 2.0.0 (ts2.8) — 2020-04-27
- 1.16.1 (ts2.6) — 2018-04-10
- 2.0.3 — 2023-10-18
- 1.16.3 — 2020-03-15
- 1.16.2 — 2020-01-08
- 1.16.0 — 2018-02-14

## README

# Installation
> `npm install --save @types/tar-fs`

# Summary
This package contains type definitions for tar-fs (https://github.com/mafintosh/tar-fs).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tar-fs.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tar-fs/index.d.ts)
````ts
// Imported from: https://github.com/soywiz/typescript-node-definitions/d.ts

/// <reference types="node" />

import { ReadStream } from "fs";
import * as tarStream from "tar-stream";

export function pack(cwd: string, opts?: PackOptions): tarStream.Pack;
export function extract(cwd: string, opts?: ExtractOptions): tarStream.Extract;

export type Pack = tarStream.Pack;
export type Extract = tarStream.Extract;

export interface Options {
    ignore?: ((name: string) => boolean) | undefined;
    filter?: ((name: string) => boolean) | undefined;
    map?: ((header: Headers) => Headers) | undefined;
    mapStream?: ((fileStream: ReadStream, header: Headers) => ReadStream) | undefined;
    dmode?: number | undefined;
    fmode?: number | undefined;
    readable?: boolean | undefined;
    writable?: boolean | undefined;
    strict?: boolean | undefined;
}

export interface PackOptions extends Options {
    entries?: string[] | undefined;
    dereference?: boolean | undefined;
    finalize?: boolean | undefined;
    finish?: ((pack: tarStream.Pack) => void) | undefined;
    pack?: tarStream.Pack | undefined;
}

export interface ExtractOptions extends Options {
    ignore?: ((name: string, header?: Headers) => boolean) | undefined;
    filter?: ((name: string, header?: Headers) => boolean) | undefined;
    strip?: number | undefined;
}

export interface Headers {
    name: string;
    mode: number;
    mtime: Date;
    size: number;
    type: "file" | "directory" | "link" | "symlink";
    uid: number;
    gid: number;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/tar-stream](https://npmjs.com/package/@types/tar-stream)

# Credits
These definitions were written by [Umoxfo](https://github.com/Umoxfo), and [Chris Wiggins](https://github.com/chriswiggins).

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