1.1.6 • Published 6 months ago
@types/jsonpack v1.1.6
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.