@get-milano/core 2.1.0
    Preparing search index...

    Class MilanoViewBuilder<R, P>

    The construction gate's public face: a MilanoView is created exclusively through a builder, obtained from an engine. Configure and build once.

    Type Parameters

    • R = unknown
    • P = R
    Index
    engine: MilanoEngine<R, P>

    The engine this view is built from; bindings read its registry.

    • Declares (or overrides) a custom action for this surface: the name, parameter shape, optional success result type, and optional failure payload type join the granted set for this builder only.

      Parameters

      • name: string
      • declaration: {
            failure?: MilanoType | null;
            parameters?: Readonly<Record<string, MilanoType>>;
            result?: MilanoType | null;
        } = {}

      Returns this

    • Grants only the listed custom actions to this surface: a document binding any other custom action fails at the gate with a SchemaViolation (rule action-capability). Built-in $ actions are contract, not capabilities, and are always available.

      Parameters

      • names: readonly string[]

      Returns this

    • Building is asynchronous: the document is parsed and validated in full, then the state data provider is awaited and its values are validated against the document's declarations. Throws typed MilanoBuildErrors; provider failures propagate unchanged.

      Returns Promise<MilanoView>

    • Declares (or overrides) a host function for this surface (contract 2.1): its argument types in order and its return type join the vocabulary's declarations for this builder only. The engine's function handler resolves it by name like any other.

      Parameters

      Returns this