import type * as T from '@traversable/registry'; import { URI } from '@traversable/registry'; import { Json } from '@traversable/json'; import type * as F from './functor.js'; export declare const isScalar: (x: unknown) => x is string | number | boolean | null | undefined; export declare const isArray: (x: unknown) => x is readonly T[]; export declare const isObject: (x: unknown) => x is { [x: string]: T; }; export declare const WeightByType: { readonly undefined: 1; readonly null: 2; readonly boolean: 4; readonly number: 8; readonly string: 16; readonly array: 128; readonly object: 256; }; export interface Free extends T.HKT { [-1]: IR; } export type IR = { tag: URI.bottom; def: Json.Scalar; } | { tag: URI.array; def: T[]; } | { tag: URI.object; def: [k: string, v: T][]; }; export type Fixpoint = { tag: URI.bottom; def: Json.Scalar; } | { tag: URI.array; def: Fixpoint[]; } | { tag: URI.object; def: [k: string, v: Fixpoint][]; }; export type Index = Omit; export type Algebra = T.IndexedAlgebra; export declare const defaultIndex: { dataPath: never[]; isRoot: true; offset: number; siblingCount: number; varName: string; }; export declare const Functor: T.Functor.Ix; export declare function fold(algebra: T.IndexedAlgebra): (json: IR, ix?: Index) => T; export declare const getWeight: (x: Json) => number; export declare const sort: (src: Json, ix?: Json.Functor.Index | undefined) => Fixpoint; export declare function interpreter(x: IR>, ix: Index): IR; export declare function generate(json: Json, index?: Index): string; //# sourceMappingURL=json.d.ts.map