Skip to content

IParameterTypeDefinition regexp #1702

Closed
@yasserf

Description

@yasserf

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @cucumber/cucumber@7.3.0 for the project I'm working on.

The IParameterTypeDefinition in code supported both RegExp and arrays of them.

Here is the diff that solved my problem:

diff --git a/node_modules/@cucumber/cucumber/lib/support_code_library_builder/types.d.ts b/node_modules/@cucumber/cucumber/lib/support_code_library_builder/types.d.ts
index 27e0f51..13b4fbe 100644
--- a/node_modules/@cucumber/cucumber/lib/support_code_library_builder/types.d.ts
+++ b/node_modules/@cucumber/cucumber/lib/support_code_library_builder/types.d.ts
@@ -39,7 +39,7 @@ export interface IDefineTestRunHookOptions {
 }
 export interface IParameterTypeDefinition<T> {
     name: string;
-    regexp: RegExp;
+    regexp: RegExp | RegExp[];
     transformer: (...match: string[]) => T;
     useForSnippets?: boolean;
     preferForRegexpMatch?: boolean;

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugDefect / Bug✅ acceptedThe core team has agreed that it is a good idea to fix thisgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions