Interface Router<Locales, RouteRef>

interface Router<Locales, RouteRef> {
    find: ((path, locale?) => null | RouteMatch<Locales, RouteRef>);
    get: ((key) => EndRoute<Locales, RouteRef>);
    toLocalizedPath: ((locale, key, args?) => string);
    toPath: ((key, args?) => string);
}

Type Parameters

Properties

find: ((path, locale?) => null | RouteMatch<Locales, RouteRef>)

Type declaration

get: ((key) => EndRoute<Locales, RouteRef>)

Type declaration

toLocalizedPath: ((locale, key, args?) => string)

Type declaration

    • (locale, key, args?): string
    • Parameters

      • locale: Locales
      • key: string
      • Optional args: any

      Returns string

toPath: ((key, args?) => string)

Type declaration

    • (key, args?): string
    • Parameters

      • key: string
      • Optional args: any

      Returns string