Creates a route parameters manager.

  • Type Parameters

    • T extends Record<string, any> = Record<string, any>

      The type of the route parameters object.

    • I extends ISwitchItem = ISwitchItem

      The type of the switch item object.

    Parameters

    • routes: I[]

      The list of routes.

    • history: any

      The history object.

    Returns { clear: void; (): null | T }

    • The function that returns the current route parameters object.