@types/tar-stream
TypeScript definitions for tar-stream
Last updated 5 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/tar-stream 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/tar-stream

Summary

This package contains type definitions for tar-stream (https://github.com/mafintosh/tar-stream).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tar-stream.

index.d.ts

// Type definitions for tar-stream 2.2
// Project: https://github.com/mafintosh/tar-stream
// Definitions by: Guy Lichtman <https://github.com/glicht>
//                 Piotr Błażejewicz <https://github.com/peterblazejewicz>
//                 Kevin Lindsay <https://github.com/kevin-lindsay-1>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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

import stream = require('stream');

export type Callback = (err?: Error | null) => any;

// see https://github.com/mafintosh/tar-stream/blob/master/headers.js
export interface Headers {
    name: string;
    mode?: number | undefined;
    uid?: number | undefined;
    gid?: number | undefined;
    size?: number | undefined;
    mtime?: Date | undefined;
    linkname?: string | null | undefined;
    type?:
        | 'file'
        | 'link'
        | 'symlink'
        | 'character-device'
        | 'block-device'
        | 'directory'
        | 'fifo'
        | 'contiguous-file'
        | 'pax-header'
        | 'pax-global-header'
        | 'gnu-long-link-path'
        | 'gnu-long-path'
        | null
        | undefined;
    uname?: string | undefined;
    gname?: string | undefined;
    devmajor?: number | undefined;
    devminor?: number | undefined;
}

export interface Pack extends stream.Readable {
    /**
     * To create a pack stream use tar.pack() and call pack.entry(header, [callback]) to add tar entries.
     */
    entry(headers: Headers, callback?: Callback): stream.Writable;
    entry(headers: Headers, buffer?: string | Buffer, callback?: Callback): stream.Writable;
    finalize(): void;
}

export interface Extract extends stream.Writable {
    on(event: string, listener: (...args: any[]) => void): this;
    on(
        event: 'entry',
        listener: (headers: Headers, stream: stream.PassThrough, next: (error?: unknown) => void) => void,
    ): this;
}

export interface ExtractOptions extends stream.WritableOptions {
    /**
     * Whether or not to attempt to extract a file that does not have an
     * officially supported format in the `magic` header, such as `ustar`.
     */
    allowUnknownFormat?: boolean | undefined;
    /**
     * The encoding of the file name header.
     */
    filenameEncoding?: BufferEncoding | undefined;
}
export function extract(opts?: ExtractOptions): Extract;

export function pack(opts?: stream.ReadableOptions): Pack;

Additional Details

  • Last updated: Sun, 17 Oct 2021 15:01:17 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Guy Lichtman, Piotr Błażejewicz, and Kevin Lindsay.

Current Tags

  • 2.2.2                                ...           latest (4 years ago)
  • 1.6.1                                ...           ts2.6 (7 years ago)
  • 1.6.1                                ...           ts2.7 (7 years ago)
  • 2.1.0                                ...           ts2.8 (6 years ago)
  • 2.1.0                                ...           ts2.9 (6 years ago)
  • 2.1.0                                ...           ts3.0 (6 years ago)
  • 2.1.0                                ...           ts3.1 (6 years ago)
  • 2.1.0                                ...           ts3.2 (6 years ago)
  • 2.2.0                                ...           ts3.3 (5 years ago)
  • 2.2.0                                ...           ts3.4 (5 years ago)
  • 2.2.0                                ...           ts3.5 (5 years ago)
  • 2.2.1                                ...           ts3.6 (5 years ago)
  • 2.2.2                                ...           ts3.7 (4 years ago)
  • 2.2.2                                ...           ts3.8 (4 years ago)
  • 2.2.2                                ...           ts3.9 (4 years ago)
  • 2.2.2                                ...           ts4.0 (4 years ago)
  • 2.2.2                                ...           ts4.1 (4 years ago)
  • 2.2.2                                ...           ts4.2 (4 years ago)
  • 2.2.2                                ...           ts4.3 (4 years ago)
  • 2.2.2                                ...           ts4.4 (4 years ago)
  • 2.2.2                                ...           ts4.5 (4 years ago)
  • 2.2.2                                ...           ts4.6 (4 years ago)

8 Versions

  • 2.2.2                                ...           4 years ago
  • 1.6.3                                ...           5 years ago
  • 2.2.1                                ...           5 years ago
  • 2.2.0                                ...           5 years ago
  • 1.6.2                                ...           6 years ago
  • 2.1.0                                ...           6 years ago
  • 1.6.1                                ...           7 years ago
  • 1.6.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |