mwbot-ts - v1.2.7
    Preparing search index...

    Interface WikilinkBase<T>Protected

    The instance members of the WikilinkBase class. For static members, see WikilinkBaseStatic (defined separately due to TypeScript limitations).

    interface WikilinkBase<T extends string | Title> {
        title: T;
        getDisplay(): string;
        hasDisplay(): boolean;
        setDisplay(display: null | string): this;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    title: T

    The title of the page that the wikilink links to.

    This property is read-only. To update it, use setTitle.

    Methods

    • Gets the display text of the wikilink. If no display text is set, the title text is returned.

      Note that interlanguage links (which appear in the sidebar) are not resolved in terms of how they are displayed there.

      Returns string

      The display text as a string.

    • Checks whether this wikilink has a display text (the part after |).

      Returns boolean

      A boolean indicating whether the wikilink has a display text.

    • Sets the display text of the wikilink.

      Parameters

      • display: null | string

        The display text. To unset it, pass an empty string or null.

      Returns this

      The current instance for chaining.