1.1.5 • Published 6 months ago
@types/xar v1.1.5
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
// Type definitions for xar 1.1
// Project: https://github.com/finnp/xar
// Definitions by: Florian Imdahl <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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: Fri, 02 Jul 2021 17:02:19 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Florian Imdahl.