Endo
    Preparing search index...

    Type Alias GuardedMethods<E>

    GuardedMethods: E extends {
        __getInterfaceGuard__?: () => InterfaceGuard<infer MG> | undefined;
    }
        ? {
            [K in keyof MG as K extends keyof E ? K : never]: TypeFromMethodGuard<
                MG[K],
            >
        }
        : never

    Extract guard-inferred method types from a Guarded exo object.

    By default, Guarded<M> uses the implementation's types (preserving parameter names). GuardedMethods re-derives the method signatures from the exo's embedded InterfaceGuard (via __getInterfaceGuard__), giving callers the guard's type contract — including .optional() parameters that the implementation may declare as required.

    Note: parameter names are NOT preserved — TypeScript has no mechanism to programmatically copy parameter names between function types. The types are correct but displayed as args_0, args_1, etc.

    Type Parameters

    • E
    const counter = makeExo('Counter', CounterI, { incr(n) { ... } });
    type CM = GuardedMethods<typeof counter>;
    // { incr: (args_0?: bigint) => bigint } — optional from guard