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

    Interface FileWikilinkStatic

    This interface defines the static members of the FileWikilink class. For instance members, see FileWikilink (defined separately due to TypeScript limitations).

    FileWikilink is a class that serves to parse [[File:...]] markups into an object structure, which is accessible via Mwbot.FileWikilink. Note that wikilinks with a non-file title are treated differently by the Wikilink class, and those with an invalid title by the RawWikilink class.

    const foo = new mwbot.FileWikilink('File:Foo');
    foo.addParam('thumb').addParam('300px');
    foo.stringify(); // [[File:Foo|thumb|300px]]
    interface FileWikilinkStatic {
        new FileWikilinkStatic(
            title: string | Title,
            params?: string[],
        ): FileWikilink;
    }

    Hierarchy

    • Omit<typeof ParamBase, "prototype">
      • FileWikilinkStatic
    Index

    Constructors

    Constructors

    • Creates a new instance.

      Usage:

      const filelink = new mwbot.FileWikilink('File:Foo');
      

      Parameters

      • title: string | Title

        The title of the file that the wikilink transcludes.

      • Optionalparams: string[]

        Optional parameters for the file link (e.g., ['thumb', '300px', ...]).

      Returns FileWikilink

      • If the title is invalid.
      • If the title is a non-file title. To objectify a non-file [[wikilink]], use Wikilink instead.