import { NeuronMiddleware } from "./Neuron"; export declare class Module implements IModule { readonly name: string; readonly onInit?: NeuronMiddleware; readonly onDispatch?: NeuronMiddleware; readonly onCallback?: NeuronMiddleware; constructor(options: ModuleOptions); } /** * Interface representing a module that provides lifecycle methods for interacting with Neuron state. */ export interface IModule { /** * The name of the module. */ readonly name: Readonly; /** * Optional lifecycle method invoked during the initialization of a Neuron. * * @param payload - The payload containing state and metadata during initialization. */ onInit?: NeuronMiddleware; /** * Optional lifecycle method invoked during the dispatch of a Neuron state change. * * @param payload - The payload containing the updated state and metadata. */ onDispatch?: NeuronMiddleware; /** * Optional lifecycle method invoked after a Neuron state change has been completed. * * @param payload - The payload containing the final state and metadata. */ onCallback?: NeuronMiddleware; } /** * Options for configuring a `Module` instance. */ export interface ModuleOptions { /** * The name of the module. */ name: string; /** * Optional lifecycle method invoked during the initialization of a Neuron. * * @param payload - The payload containing state and metadata during initialization. */ onInit?: NeuronMiddleware; /** * Optional lifecycle method invoked during the dispatch of a Neuron state change. * * @param payload - The payload containing the updated state and metadata. */ onDispatch?: NeuronMiddleware; /** * Optional lifecycle method invoked after a Neuron state change has been completed. * * @param payload - The payload containing the final state and metadata. */ onCallback?: NeuronMiddleware; }