TypeDoc API - v0.28.1

    Interface Router

    Interface which routers must conform to.

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

    Implemented by

    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 undefined | string

    • 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

    MMNEPVFCICPMFPCPTTAAATR