Type alias ToUrl<T>

ToUrl<T>: ((value: T, params?: Params) => string)

Type Parameters

  • T extends string = string

    See RouteConfig for details.

Type declaration

    • (value: T, params?: Params): string
    • Function to generate a URL from a value and params.

      Returns

      the URL.

      Parameters

      • value: T

        the route value.

      • Optional params: Params

        the path parameters and, optionally query parameters. Any parameters not part of path parameters are automatically added as query parameters. Warning: if you do not specify values for route path parameters, they will be undefined in the resulting URL.

      Returns string

Generated using TypeDoc