Mocky Balboa API Reference
    Preparing search index...

    Interface RouteOptions

    Options when configuring a route

    interface RouteOptions {
        times?: number;
        type?: RouteType;
    }
    Index

    Properties

    Properties

    times?: number

    Total number of times that a route handler will be run when the URL pattern matcher is a hit.

    When undefined, the route handler will be run indefinitely.

    type?: RouteType

    Defines the behaviour of the route handler.

    • server-only - The route handler will only be called if the request is executed on the server.
    • client-only - The route handler will only be called if the request is executed on the client.
    • both - The route handler will be called regardless of whether the request is executed on the server or client.
    "both"