@types/xar
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

Installation

npm install --save @types/xar

Summary

This package contains type definitions for xar (https://github.com/finnp/xar).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xar.

index.d.ts

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

import { Readable as ReadableStream } from "stream";

export interface TOCHeader {
    cksumAlg: number;
    size: number;
    tocLengthCompressed: number;
    tocLengthUncompressed: number;
    version: number;
}

export type Compression = "none" | "gzip";

export interface PackOptions {
    compression?: Compression | undefined;
}

export type ExtractCallback = (error: Error | null, file: Record<string, any>, content?: string) => void;

export type GetTOCCallback = (
    error: Error | null,
    xmlBuffer: Buffer,
    json: Record<string, any>,
    header: TOCHeader,
) => void;

export function extract(data: Buffer, cb: ExtractCallback): void;
export const unpack: typeof extract;

export function pack(dir: string, opts?: PackOptions): ReadableStream;
export const create: typeof pack;

export function getToc(data: Buffer, cb: GetTOCCallback): void;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Florian Imdahl.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/xar

Weekly Downloads

0

Version

1.1.5

License

MIT

Unpacked Size

4.35 kB

Total Files

5

Last publish

Collaborators

  • types