UNPKG

r2-lcp-js

Version:

Readium 2 LCP bits for NodeJS (TypeScript)

16 lines (15 loc) 596 B
export type AnyJson = JsonPrimitives | JsonArray | JsonMap; export type JsonPrimitives = string | number | boolean | null; export interface JsonMap { [key: string]: AnyJson; } export interface JsonArray extends Array<AnyJson> { } export declare const KeyToPreserveUnknownJSON = "AdditionalJSON"; export interface IWithAdditionalJSON { [KeyToPreserveUnknownJSON]: JsonMap | undefined; } type TConstructor<T> = new (value?: any) => T; export declare function TaJsonDeserialize<T>(json: any, type: TConstructor<T>): T; export declare function TaJsonSerialize<T>(obj: T): JsonMap; export {};