import { type StaticDirection, type StaticDecode, type StaticType } from './static.mjs'; import { type TSchema } from './schema.mjs'; import { type TProperties } from './properties.mjs'; export type StaticCodec = (Direction extends 'Decode' ? Decoded : StaticType>); export type TDecodeCallback = (input: Encoded) => Decoded; export type TEncodeCallback = (input: Decoded) => Encoded; export type TCodec = Type & { '~codec': { encode: TDecodeCallback; decode: TEncodeCallback; }; }; export declare class EncodeBuilder { private readonly type; private readonly decode; constructor(type: Type, decode: globalThis.Function); Encode(callback: TEncodeCallback): TCodec; } export declare class DecodeBuilder { private readonly type; constructor(type: Type); Decode>(callback: Callback): EncodeBuilder>; } /** Creates a bi-directional Codec. Codec functions are called on Value.Decode and Value.Encode. */ export declare function Codec(type: Type): DecodeBuilder>; /** Createsa uni-directional Codec with Decode only. The Decode function is called on Value.Decode */ export declare function Decode, unknown>>(type: Type, callback: Callback): TCodec>; /** Creates a uni-directional Codec with Encode only. The Encode function is called on Value.Encode */ export declare function Encode(type: Type, callback: TEncodeCallback, unknown>): TCodec; export declare function IsCodec(value: unknown): value is TCodec;