@cucumber/node
    Preparing search index...

    Type Alias ParameterTypeOptions

    Options for defining a custom parameter type.

    type ParameterTypeOptions = {
        name: string;
        preferForRegexpMatch?: boolean;
        regexp: RegExp | string | readonly RegExp[] | readonly string[];
        transformer?: (this: World, ...match: string[]) => unknown;
        useForSnippets?: boolean;
    }
    Index

    Properties

    name: string

    The name of the parameter type.

    preferForRegexpMatch?: boolean

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

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

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

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

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

    Type declaration

      • (this: World, ...match: string[]): unknown
      • Parameters

        • this: World
        • ...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 this parameter type should be used when suggesting snippets for missing step definitions.

    true