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

    Interface ParsedParserFunctionStaticPrivate

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

    This class is exclusive to Wikitext.parseTemplates. It represents a well-formed {{#parserfunction:...}} markup with a valid title. For the class that represents a well-formed {{template}} markup, see ParsedTemplateStatic. (and also RawTemplateStatic).

    This class differs from ParsedTemplate in that:

    The constructor of this class is inaccessible, and instances can only be referenced in the result of parseTemplates.

    To check if an object is an instance of this class, use TemplateStatic.is.

    Important:

    The instance properties of this class are pseudo-read-only, in the sense that altering them does not affect the behaviour of Wikitext.modifyTemplates.

    interface ParsedParserFunctionStatic {
        new ParsedParserFunctionStatic(
            initializer: ParsedTemplateInitializer,
        ): ParsedParserFunction;
        verify(hook: string): null | VerifiedFunctionHook;
    }

    Hierarchy

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Verifies the given string as a parser function hook.

      Usage:

      const verifiedHook = mwbot.ParserFunction.verify('#hook:');
      

      Parameters

      • hook: string

        A potential parser function hook as a string. This must end with a colon character.

      Returns null | VerifiedFunctionHook

      An object representing the canonical function hook and the matched function hook, or null.