isomorphic-msw
    Preparing search index...

    Type Alias SetupServerOrWorker

    An MSW server or worker.

    type SetupServerOrWorker = {
        listHandlers: () => RequestHandler[];
        resetHandlers: (...handlers: RequestHandler[]) => void;
        restoreHandlers: () => void;
        start: (options?: SetupServerOrWorkerOptions) => Promise<void>;
        stop: () => void;
        type: "server" | "worker";
        use: (...handlers: RequestHandler[]) => void;
    }
    Index

    Properties

    listHandlers: () => RequestHandler[]

    Return the list of current request handlers.

    resetHandlers: (...handlers: RequestHandler[]) => void

    Reset request handlers to the initial list.

    restoreHandlers: () => void

    Mark used one-time request handlers as unused.

    start: (options?: SetupServerOrWorkerOptions) => Promise<void>

    Start request interception.

    Type declaration

    stop: () => void

    Stop request interception.

    type: "server" | "worker"

    A type indicating whether this is a server or a worker.

    use: (...handlers: RequestHandler[]) => void

    Prepend request handlers to the current worker instance.