/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { TSchema } from "@sinclair/typebox";
import { JsonCompatibleReadOnly } from "../../util/index.js";
import { type ICodecFamily, ICodecOptions, IJsonCodec, type FormatVersion } from "../codec.js";
import { Versioned } from "./format.js";
export declare function makeVersionedCodec<TDecoded, TEncoded extends Versioned = JsonCompatibleReadOnly & Versioned, TValidate = TEncoded, TContext = void>(supportedVersions: Set<FormatVersion>, { jsonValidator: validator }: ICodecOptions, inner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>): IJsonCodec<TDecoded, TEncoded, TValidate, TContext>;
export declare function makeVersionedValidatedCodec<EncodedSchema extends TSchema, TDecoded, TEncoded extends Versioned = JsonCompatibleReadOnly & Versioned, TValidate = TEncoded, TContext = void>(options: ICodecOptions, supportedVersions: Set<number>, schema: EncodedSchema, codec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>): IJsonCodec<TDecoded, TEncoded, TValidate, TContext>;
/**
 * Creates a codec which dispatches to the appropriate member of a codec family based on the version of
 * data it encounters.
 * Each member of the codec family must write an explicit version number into the data it encodes.
 */
export declare function makeVersionDispatchingCodec<TDecoded, TContext>(family: ICodecFamily<TDecoded, TContext>, options: ICodecOptions & {
    writeVersion: number;
}): IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>;
//# sourceMappingURL=codec.d.ts.map