Interface RouterBuilder<Locales, RouteRef>

interface RouterBuilder<Locales, RouteRef> {
    add: ((path, ref, key?) => this);
    addLocalized: ((localizedPaths, ref, key?) => this);
    addLocalizedSegment: ((localizedPaths, buildSegment) => this);
    addSegment: ((path, buildSegment) => this);
    createRouter: (() => Router<Locales, RouteRef>);
    getRoutes: (() => Routes<Locales, RouteRef>);
}

Type Parameters

Properties

add: ((path, ref, key?) => this)

Type declaration

    • (path, ref, key?): this
    • Parameters

      • path: string
      • ref: RouteRef
      • Optional key: string

      Returns this

addLocalized: ((localizedPaths, ref, key?) => this)

Type declaration

addLocalizedSegment: ((localizedPaths, buildSegment) => this)

Type declaration

    • (localizedPaths, buildSegment): this
    • Parameters

      Returns this

addSegment: ((path, buildSegment) => this)

Type declaration

    • (path, buildSegment): this
    • Parameters

      • path: string
      • buildSegment: ((builder) => void)
          • (builder): void
          • Parameters

            Returns void

      Returns this

createRouter: (() => Router<Locales, RouteRef>)

Type declaration

getRoutes: (() => Routes<Locales, RouteRef>)

Type declaration