type NonJsonTypes = 'date' | 'set' | 'map' | 'regexp' | 'bigint' | 'undefined' | 'infinity' | '-infinity' | 'nan' | 'error' | string; type MetaType = Record; type CustomTypeEntry = { type: string; is: (value: unknown) => boolean; serialize: (value: T) => string; deserialize: (value: string) => T; }; export declare function registerCustomType(entry: CustomTypeEntry): void; declare function serialize(data: T): TypedJsonResult; declare function deserialize({ json, meta }: TypedJsonResult): T | null; export declare const splitKey: (key: string) => string[]; declare function applyMeta(data: T, meta: MetaType): T; type TypedJsonResult = { json?: string | null; meta?: MetaType; }; type StrigifyParameters = Parameters; declare function stringify(data: T, replacer?: StrigifyParameters[1], space?: StrigifyParameters[2]): string; declare function parse(json: string): T | null; declare const typedjson: { serialize: typeof serialize; stringify: typeof stringify; deserialize: typeof deserialize; parse: typeof parse; applyMeta: typeof applyMeta; }; export { applyMeta, deserialize, parse, serialize, stringify }; export type { MetaType, TypedJsonResult }; export default typedjson;