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

    Type Alias Bounds<S, L, U>

    Bounds: S extends Lazy<infer T extends Shape>
        ?
            | (L extends undefined | 0 ? undefined : never)
            | (
                T extends DictionaryShape
                    ? { readonly [K in keyof T["model"] & string]: Boxed<string, U> }
                    : Boxed<T["model"], U>
            )
        : never

    Conditions a shape's model on cardinality bounds to produce the template-side value type.

    Pairs a value or union shape with its cardinality bounds to yield the type that the matching template slot carries: the bare model value for scalar ranges (maxCount === 1), a singleton tuple for multi-valued ranges, unioned with undefined whenever the minimum cardinality permits absence. Dictionary shapes project to a tag-keyed map — a single-string-per-tag map for scalar cardinality and a string-array-per-tag map for multi-valued cardinality; when the model declares a specific tag set (for example dictionary({ en: "" })), the map narrows to that key set so undeclared tags are rejected, falling back to the open TagRange-indexed map when the model is unconstrained. Reach for Bounds when a test or derived type needs to spell out the exact template type of a property; for runtime values, use State.

    Type Parameters

    • S extends Lazy<Shape>

      The lazy Shape to extract from

    • L extends undefined | number

      The minCount conditioning the projection

    • U extends undefined | number

      The maxCount conditioning the projection