Stone.js API
    Preparing search index...

    Interface IDispacher<IncomingEventType, OutgoingResponseType>

    Defines the structure for route dispatchers.

    interface IDispacher<
        IncomingEventType extends IIncomingEvent,
        OutgoingResponseType = unknown,
    > {
        dispatch: (
            context: DispatcherContext<IncomingEventType, OutgoingResponseType>,
        ) => Promiseable<OutgoingResponseType>;
        getName: (
            route: Route<IncomingEventType, OutgoingResponseType>,
        ) => Promiseable<string>;
    }

    Type Parameters

    • IncomingEventType extends IIncomingEvent
    • OutgoingResponseType = unknown

    Implemented by

    Index
    dispatch: (
        context: DispatcherContext<IncomingEventType, OutgoingResponseType>,
    ) => Promiseable<OutgoingResponseType>
    getName: (
        route: Route<IncomingEventType, OutgoingResponseType>,
    ) => Promiseable<string>