diff --git a/types/cucumber/cucumber-tests.ts b/types/cucumber/cucumber-tests.ts index a56d0514cd..4d20be0085 100644 --- a/types/cucumber/cucumber-tests.ts +++ b/types/cucumber/cucumber-tests.ts @@ -165,7 +165,13 @@ function StepSample() { defineParameterType({ regexp: /particular/, transformer: s => s.toUpperCase(), - typeName: 'param' + typeName: 'param' // deprecated but still supported + }); + + defineParameterType({ + regexp: /particularly/, + transformer: s => s.toUpperCase(), + name: 'param' }); Given('a {param} step', param => { diff --git a/types/cucumber/index.d.ts b/types/cucumber/index.d.ts index d5683c385f..4824269363 100644 --- a/types/cucumber/index.d.ts +++ b/types/cucumber/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for cucumber-js 3.1 +// Type definitions for cucumber-js 3.2 // Project: https://github.com/cucumber/cucumber-js // Definitions by: Abraão Alves // Jan Molak @@ -66,7 +66,8 @@ export type AroundCode = (scenario: HookScenarioResult, runScenario?: (error: st export interface Transform { regexp: RegExp; transformer(arg: string): any; - typeName: string; + name?: string; + typeName?: string; // deprecated } export interface HookOptions {