|
1 | | -export type JsonZReviver = (key: string, value: any, holder?: any) => any; |
2 | | - |
3 | | -export type JsonZReplacer = (holder: any, key: string, value: any) => any; |
4 | | -export type JsonZAllowedKeys = (string | number)[]; |
5 | | - |
6 | | -export enum Quote { |
7 | | - DOUBLE, |
8 | | - SINGLE, |
9 | | - PREFER_DOUBLE, |
10 | | - PREFER_SINGLE |
11 | | -} |
12 | | - |
13 | | -export enum OptionSet { |
14 | | - MAX_COMPATIBILITY = 0, |
15 | | - RELAXED = 1, |
16 | | - THE_WORKS = 2 |
17 | | -} |
18 | | - |
19 | | -export enum ExtendedTypeMode { |
20 | | - OFF, |
21 | | - AS_FUNCTIONS, |
22 | | - AS_OBJECTS |
23 | | -} |
24 | | - |
25 | | -export interface JsonZOptions { |
26 | | - extendedPrimitives?: boolean, |
27 | | - extendedTypes?: ExtendedTypeMode, |
28 | | - primitiveBigDecimal?: boolean; |
29 | | - primitiveBigInt?: boolean; |
30 | | - primitiveDecimal?: boolean; |
31 | | - quote?: '"' | "'" | Quote; |
32 | | - quoteAllKeys?: boolean; |
33 | | - replacer?: JsonZReplacer | JsonZAllowedKeys; |
34 | | - revealHiddenArrayProperties?: boolean; |
35 | | - space?: string | number | String | Number; |
36 | | - sparseArrays?: boolean; |
37 | | - trailingComma?: boolean; |
38 | | - typePrefix?: string; |
39 | | -} |
40 | | - |
41 | | -export interface JsonZTypeHandler { |
42 | | - name: string; |
43 | | - test: (instance: any, options?: JsonZOptions) => boolean; |
44 | | - creator: (value: any) => any; |
45 | | - serializer: (instance: any, options?: JsonZOptions) => any; |
46 | | -} |
47 | | - |
48 | | -export interface JsonZParseOptions { |
49 | | - reviveTypedContainers?: boolean; |
50 | | - reviver?: JsonZReviver; |
51 | | -} |
52 | | - |
53 | | -export function parse(text: string, options?: JsonZParseOptions): any; |
54 | | -export function parse(text: string, reviver?: JsonZReviver, options?: JsonZParseOptions): any; |
55 | | - |
56 | | -export function stringify(value: any, replacer?: JsonZReplacer | JsonZAllowedKeys, |
57 | | - space?: string | number | String | Number): string; |
58 | | -export function stringify(value: any, options?: JsonZOptions | OptionSet, |
59 | | - space?: string | number | String | Number): string; |
60 | | - |
61 | | -export function setOptions(options: JsonZOptions | OptionSet, extraOptions?: JsonZOptions): void; |
62 | | -export function resetOptions(): void; |
63 | | - |
64 | | -export function setParseOptions(options: JsonZParseOptions): void; |
65 | | - |
66 | | -export function resetParseOptions(): void; |
67 | | - |
68 | | -export function addTypeHandler(handler: JsonZTypeHandler): void; |
69 | | -export function removeTypeHandler(typeName: string): void; |
70 | | -export function resetStandardTypeHandlers(): void; |
71 | | -export function restoreStandardTypeHandlers(): void; |
72 | | -export function globalizeTypeHandlers(prefix?: string): void; |
73 | | -export function removeGlobalizedTypeHandlers(): void; |
74 | | - |
75 | | -export const DELETE: Symbol; |
76 | | -export const UNDEFINED: Symbol; |
77 | | -export const LITERALLY_AS: (value: string) => any; |
78 | | - |
79 | | -export function hasBigDecimal(): boolean; |
80 | | - |
81 | | -export function setBigDecimal(bigDoubleClass: any): void; |
82 | | - |
83 | | -export function hasDecimal(): boolean; |
84 | | - |
85 | | -export function setDecimal(decimalClass: any): void; |
| 1 | +export { hasBigDecimal, hasDecimal, setBigDecimal, setDecimal } from './bignumber-util'; |
| 2 | +export { |
| 3 | + addTypeHandler, ExtendedTypeMode, globalizeTypeHandlers, OptionSet, JsonZOptions, JsonZParseOptions, |
| 4 | + removeGlobalizedTypeHandlers, removeTypeHandler, resetOptions, resetParseOptions, resetStandardTypeHandlers, |
| 5 | + restoreStandardTypeHandlers, reviveTypeValue, Quote, serializeExtendedType, setOptions, setParseOptions |
| 6 | +} from './options-manager'; |
| 7 | +export { parse } from './parse'; |
| 8 | +export { stringify } from './stringify'; |
| 9 | +export { DELETE, LITERALLY_AS, UNDEFINED } from './util'; |
| 10 | + |
| 11 | +declare const JSONZ; |
| 12 | + |
| 13 | +export = JSONZ; |
0 commit comments