@neutrium/formatter - v1.0.1
    Preparing search index...

    Interface ContractCodec<Contracts>

    Associates ordered FormatContract entries with a codec.

    This interface contributes type information only; the codec's methods and FormatCodec.resolve result must implement the declared behavior. The first matching specification wins, so place narrower contracts first.

    import type {
    ContractCodec,
    FormatCodec,
    FormatContract,
    FormatSpecBase,
    } from "@neutrium/formatter/extensions";

    interface LabelSpec extends FormatSpecBase {
    kind: "label";
    compact?: boolean;
    }

    type LabelContracts = readonly [
    FormatContract<LabelSpec & { compact: true }, string, never, false>,
    FormatContract<LabelSpec, string, string, false>,
    ];

    declare const labelCodec:
    FormatCodec<"label", string, LabelSpec, string> &
    ContractCodec<LabelContracts>;
    interface ContractCodec<Contracts extends readonly FormatContract[]> {
        "[formatContracts]"?: Contracts;
    }

    Type Parameters

    Index
    "[formatContracts]"?: Contracts

    Type-only ordered contract metadata; no runtime property is required.