@grafctory/blue - v0.17.0
    Preparing search index...

    Type Alias DictionaryConstraints

    Constraints accepted by the dictionary shape factory.

    Bounds the languages a map may key its text by, the languages it must cover, and how many strings a tag carries. The rules for each string belong to the content shape, the first argument of the dictionary factory.

    type DictionaryConstraints = {
        uniqueLang?: boolean;
        languageIn?: readonly TagRange[];
        hasLanguage?: readonly TagRange[];
    }
    Index
    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)

    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)

    hasLanguage?: readonly TagRange[]

    Required language ranges.

    When specified, every listed TagRange must be matched under RFC 4647 basic filtering by a tag carrying some content, so that en is satisfied by an en-US entry and * by any entry at all. Empty arrays are ignored.

    The constraint holds the entries of a map that is given and leaves presence to the member cardinality, so an optional member left out, or stating a map with no content, satisfies it. Ranges that no tag admitted by languageIn could match are rejected at build time, before any value is ever held to them.

    Inheritance — child may only add required ranges.

    Note

    SHACL has no native equivalent: each range maps to a qualified value shape requiring one matching entry.

    undefined (no required languages)