@metreeca/blue - v0.12.0
    Preparing search index...

    Type Alias DictionaryConstraints

    Constraints accepted by the dictionary shape factory.

    Bounds the content a tag may carry and the languages the map may key it by. Length bounds are matched against each string separately, so a value is held to them whatever language it is stated in.

    type DictionaryConstraints = {
        uniqueLang?: boolean;
        minLength?: number;
        maxLength?: number;
        languageIn?: readonly TagRange[];
    }
    Index

    Properties

    uniqueLang?: boolean

    Restricts every tag to a single string.

    When true, a tag carries a single string, so that a member stating several values spreads them across languages rather than stacking them under one. Fixes the arity the content is resolved at: a bare string under every tag where the constraint is stated, an array of strings under every tag otherwise.

    Inheritance — a child may add the constraint but not drop it: overriding a unique-tagged parent with a non-unique-tagged child is rejected.

    undefined (several strings admitted per tag)

    minLength?: number

    Minimum string length in characters.

    Inheritance — child may only raise the minimum length.

    undefined (no minimum length)

    maxLength?: number

    Maximum string length in characters.

    Inheritance — child may only lower the maximum length.

    undefined (no maximum length)

    languageIn?: readonly TagRange[]

    Allowed language ranges.

    When specified, every tag the map is keyed by must match one of the given TagRange values under RFC 4647 basic filtering. Each range is a basic language range (a sequence of subtags or the standalone * wildcard); extended ranges such as en-* are not accepted. Empty arrays are ignored. Language tags, which identify a language rather than select one, are described by tag instead.

    Inheritance — child may only drop accepted ranges.

    undefined (no language constraint)