mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
cypress-cucumber-preprocessor: Fix defineParameterType definition (#43132)
* cypress-cucumber-preprocessor: Add Transform type definition and use it for defineParameterType definition
This commit is contained in:
parent
6243c9ad45
commit
f8fafa79cb
@ -1,6 +1,8 @@
|
||||
// Type definitions for cypress-cucumber-preprocessor 1.14
|
||||
// Project: https://github.com/TheBrainFamily/cypress-cucumber-preprocessor
|
||||
// Definitions by: Alec Brunelle <https://github.com/aleccool213>, Falcon Taylor-Carter <https://github.com/falconertc>
|
||||
// Definitions by: Alec Brunelle <https://github.com/aleccool213>
|
||||
// Falcon Taylor-Carter <https://github.com/falconertc>
|
||||
// Jens Peters <https://github.com/jp7677>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user