diff --git a/types/cypress-cucumber-preprocessor/index.d.ts b/types/cypress-cucumber-preprocessor/index.d.ts index 605bed8812..f1a5f2cccc 100644 --- a/types/cypress-cucumber-preprocessor/index.d.ts +++ b/types/cypress-cucumber-preprocessor/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for cypress-cucumber-preprocessor 1.14 // Project: https://github.com/TheBrainFamily/cypress-cucumber-preprocessor -// Definitions by: Alec Brunelle , Falcon Taylor-Carter +// Definitions by: Alec Brunelle +// Falcon Taylor-Carter +// Jens Peters // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 diff --git a/types/cypress-cucumber-preprocessor/steps/index.d.ts b/types/cypress-cucumber-preprocessor/steps/index.d.ts index d86c5354ea..fa339c001a 100644 --- a/types/cypress-cucumber-preprocessor/steps/index.d.ts +++ b/types/cypress-cucumber-preprocessor/steps/index.d.ts @@ -1,10 +1,19 @@ +export interface Transform { + regexp: RegExp; + transformer(...arg: string[]): any; + useForSnippets?: boolean; + preferForRegexpMatch?: boolean; + name?: string; + typeName?: string; // deprecated +} + export function given(expression: RegExp | string, implementation: (...args: any[]) => void): void; export function when(expression: RegExp | string, implementation: (...args: any[]) => void): void; export function then(expression: RegExp | string, implementation: (...args: any[]) => void): void; export function and(expression: RegExp | string, implementation: (...args: any[]) => void): void; export function but(expression: RegExp | string, implementation: (...args: any[]) => void): void; export function defineStep(expression: RegExp | string, implementation: (...args: any[]) => void): void; -export function defineParameterType(): void; +export function defineParameterType(parameterType: Transform): void; // Aliased versions of the above funcs. export function Given(expression: RegExp | string, implementation: (...args: any[]) => void): void;