Stone.js API
    Preparing search index...

    Interface MetaStore<State>

    A registered store, in any of the three forms the framework accepts everywhere else.

    The data definition plays the plain role: state with no behaviour. The class and the factory carry behaviour, and both are built through the container, so a store can hold the services its actions need. stone.store.stores accepts any mix of the three.

    interface MetaStore<State extends Record<string, any> = Record<string, any>> {
        isClass?: boolean;
        isFactory?: boolean;
        module: StoreClass<State> | StoreFactory<State>;
        name: string;
        perRequest?: boolean;
    }

    Type Parameters

    • State extends Record<string, any> = Record<string, any>
    Index
    isClass?: boolean

    Whether module is a class to construct.

    isFactory?: boolean

    Whether module is a factory to call with the container.

    The class or the factory to build.

    name: string

    The name it is resolved under, in the container and in the snapshot.

    perRequest?: boolean

    Same semantics as StoreDefinition.perRequest, same default.