mise API - v0.0.0
    Preparing search index...

    Function envelope_typed

    • Narrows a core's envelope to its declared kind.

      The single trusted assertion of the typed API: each command core is the sole producer of its kind, so the envelope it returns carries that kind's payload by construction. Centralized here so the facade methods stay cast-free.

      Type Parameters

      Parameters

      • envelope: {
            errors?: { message: string; type: "error" | "warning" }[];
            model?: { data: unknown; kind: string };
            rendered: string;
            renderedErr?: string;
            status: "error" | "ok";
            trace?: {
                executed?: string;
                input: string;
                proposed: string;
                validated: boolean;
            };
        }

        The envelope a command core returned.

      Returns TypedEnvelope<K>

      The same envelope, typed by its kind.