@cucumber/core
    Preparing search index...

    Interface NewParameterType

    Attributes for creating a new parameter type

    interface NewParameterType {
        name: string;
        preferForRegexpMatch?: boolean;
        regexp: string | RegExp | readonly RegExp[] | readonly string[];
        sourceReference: SourceReference;
        transformer?: (...match: string[]) => unknown;
        useForSnippets?: boolean;
    }
    Index

    Properties

    name: string

    The name of the parameter type

    preferForRegexpMatch?: boolean

    Whether the regular expression(s) for the parameter type should take precedence if used in conjunction with regular expressions for step definitions

    false
    
    regexp: string | RegExp | readonly RegExp[] | readonly string[]

    One or more regular expressions which should be used to match the parameter type

    sourceReference: SourceReference

    A reference to the source code of the user-defined parameter

    transformer?: (...match: string[]) => unknown

    A function for transforming the matched values to another object before passing to the step function

    Type declaration

      • (...match: string[]): unknown
      • Parameters

        • ...match: string[]

          matched values from the regular expression

        Returns unknown

    If not provided, the raw matched value(s) will be passed to the step function.

    useForSnippets?: boolean

    Whether the parameter type should be used when suggesting snippets for missing step definitions

    true