import type * as T from '@traversable/registry'; import { t } from '@traversable/schema'; import type { Index } from './functor.js'; export type IR = t.Leaf | t.eq | t.ref | t.array | t.record | t.optional | t.union | t.intersect | t.tuple | t.object<[k: string, T][]>; export declare namespace IR { type Options = { preSortIndex?: number; }; const defaults: {}; function clone(schema: T, { preSortIndex }?: Options): T & { preSortIndex?: number | undefined; }; } export type F = t.Leaf | t.eq | t.array | t.record | t.optional | t.union | t.intersect | t.tuple | t.object<[k: string, v: T][]>; export type Fixpoint = t.Leaf | t.eq | t.array | t.record | t.optional | t.union | t.intersect | t.tuple | t.object<[k: string, v: Fixpoint][]>; export interface Free extends T.HKT { [-1]: F; } export type Context = { VAR: string; indent(numberOfSpaces: number): string; dedent(numberOfSpaces: number): string; join(numberOfSpaces: number): string; }; export declare const makeIndent: (offset: number) => (numberOfSpaces: number) => string; export declare const makeDedent: (offset: number) => (numberOfSpaces: number) => string; export declare const makeJoin: (offset: number) => (numberOfSpaces: number) => string; export declare const buildContext: (ix: T.Require) => Context; export declare function keyAccessor(key: keyof any | undefined, $: Index): string; /** * Binding the element's index to the element itself is a hack to make sure * we preserve the original order of the tuple, even while sorting */ export declare const bindPreSortIndices: (x: T[]) => T[]; /** * Reading `x` to access the "preSortIndex" is a hack to make sure * we preserve the original order of the tuple, even while sorting */ export declare function indexAccessor(index: keyof any | undefined, $: { isOptional?: boolean; }, x?: any): string; //# sourceMappingURL=shared.d.ts.map