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

    Interface ParserFunctionOutputConfig

    interface ParserFunctionOutputConfig {
        brPredicate?: (param: string, index: number) => boolean;
        prepend?: string;
        sortPredicate?: (param1: string, param2: string) => number;
        useCanonical?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    brPredicate?: (param: string, index: number) => boolean

    A predicate function to determine whether there should be a line break after each function parameter.

    This predicate is called on every parameter if provided. If sortPredicate is also provided, the predicate is evaluated against the reordered array.

    Type declaration

      • (param: string, index: number): boolean
      • Parameters

        • param: string

          A function parameter string.

        • index: number

          The parameter index.

        Returns boolean

        true to add a trailing line break, or false otherwise.

    prepend?: string

    Optional text to add before the function hook (e.g., subst:).

    sortPredicate?: (param1: string, param2: string) => number

    Callback function to Array.prototype.sort, called on a deep copy of ParserFunction.params (i.e., the original array is not mutated).

    useCanonical?: boolean

    Whether to use the canonical function hook.