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

1.1.6 • Public • Published

Installation

npm install --save @types/jsonpack

Summary

This package contains type definitions for jsonpack (https://github.com/sapienlab/jsonpack).

Details

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

index.d.ts

export interface PackOptions {
    verbose?: boolean | undefined;
}

export interface PackDebugOptions extends PackOptions {
    debug?: boolean | undefined;
}

export interface DebugObject {
    dictionary: {
        strings: string[];
        integers: number[];
        floats: number[];
    };
    ast: Array<{
        type: string;
        index: number;
    }>;
    packed: string;
}

export function pack(json: string | object, options?: PackOptions): string;
export function pack(json: string | object, options?: PackDebugOptions): DebugObject;
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function unpack<T = {}>(packed: string, options?: PackOptions): T;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Vlad Jerca.

/@types/jsonpack/

    Package Sidebar

    Install

    npm i @types/jsonpack

    Weekly Downloads

    5,486

    Version

    1.1.6

    License

    MIT

    Unpacked Size

    3.92 kB

    Total Files

    5

    Last publish

    Collaborators

    • types