vapor-chamber API reference - v1.16.0
    Preparing search index...

    Interface GlobalCommands

    GlobalCommands — module-augmentation hook that types the SHARED bus (pinia-style). Augment it once in your app and every useCommand() / getCommandBus() call site gets typed dispatch/register with autocomplete and compile errors:

    declare module 'vapor-chamber' {
    interface GlobalCommands {
    cartAdd: { target: Product; payload: { qty: number }; result: Cart };
    cartClear: { target: null; result: Cart };
    }
    }

    Unaugmented, everything stays exactly as loose as before (string actions,
    `any` targets). Schema users: derive the entries with `CommandsOf<S>` from
    './schema' instead of writing them by hand.