KC's Workspace
    Preparing search index...

    Interface which routers must conform to.

    interface Router {
        baseRelativeUrl(from: RouterTarget, target: string): string;
        buildPages(project: ProjectReflection): PageDefinition<RouterTarget>[];
        getAnchor(refl: RouterTarget): string | undefined;
        getFullUrl(refl: RouterTarget): string;
        getLinkTargets(): RouterTarget[];
        getSlugger(reflection: RouterTarget): Slugger;
        hasOwnDocument(refl: RouterTarget): boolean;
        hasUrl(target: RouterTarget): boolean;
        relativeUrl(from: RouterTarget, to: RouterTarget): string;
    }
    Index

    Methods

    • Should return a URL relative to the project base. This is used for determining links to items in the assets folder.

      Parameters

      Returns string

    • Gets an anchor for this target within its containing page. May be undefined if this target owns its own page.

      Parameters

      Returns string | undefined

    • Get the full URL to the target. In TypeDoc's default router this is equivalent to relativeUrl(project, refl), but this might not be the case for custom routers which place the project somewhere else besides index.html.

      The URL returned by this by the frontend JS when building dynamic URLs for the search, full hierarchy, and navigation components.

      Parameters

      Returns string

    • Responsible for getting a slugger for the given target. If a target is not associated with a page, the slugger for the parent target should be returned instead.

      Parameters

      Returns Slugger