1.1.6 • Published 6 months ago

@types/jsonpack v1.1.6

Weekly downloads
882
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for jsonpack 1.1
// Project: https://github.com/sapienlab/jsonpack
// Definitions by: Vlad Jerca <https://github.com/vladjerca>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

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;
// tslint:disable-next-line no-unnecessary-generics
export function unpack<T = {}>(packed: string, options?: PackOptions): T;

Additional Details

  • Last updated: Thu, 08 Jul 2021 16:22:55 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Vlad Jerca.

1.1.6

6 months ago

1.1.5

7 months ago

1.1.4

8 months ago

1.1.3

9 months ago

1.1.2

1 year ago

1.1.1

3 years ago

1.1.0

5 years ago