Skip to content

Commit 7d4a3d5

Browse files
authored
fix(types): getting the types up to date (#402)
re #385
1 parent 284d5f5 commit 7d4a3d5

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

steps/index.d.ts

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,70 @@
1+
export interface Transform {
2+
regexp: RegExp;
3+
transformer(...arg: string[]): any;
4+
useForSnippets?: boolean;
5+
preferForRegexpMatch?: boolean;
6+
name?: string;
7+
typeName?: string; // deprecated
8+
}
9+
110
export function given(
211
expression: RegExp | string,
12+
config: { timeout?: number },
313
implementation: (...args: any[]) => void
414
): void;
5-
export function when(
15+
16+
export function given(
617
expression: RegExp | string,
718
implementation: (...args: any[]) => void
819
): void;
9-
export function then(
20+
21+
export function when(
1022
expression: RegExp | string,
23+
config: { timeout?: number },
1124
implementation: (...args: any[]) => void
1225
): void;
13-
export function and(
26+
27+
export function when(
1428
expression: RegExp | string,
1529
implementation: (...args: any[]) => void
1630
): void;
17-
export function but(
31+
32+
export function then(
1833
expression: RegExp | string,
34+
config: { timeout?: number },
1935
implementation: (...args: any[]) => void
2036
): void;
21-
export function given(
37+
38+
export function then(
2239
expression: RegExp | string,
23-
config: { timeout?: number },
2440
implementation: (...args: any[]) => void
2541
): void;
26-
export function when(
42+
43+
export function and(
2744
expression: RegExp | string,
2845
config: { timeout?: number },
2946
implementation: (...args: any[]) => void
3047
): void;
31-
export function then(
48+
export function and(
3249
expression: RegExp | string,
33-
config: { timeout?: number },
3450
implementation: (...args: any[]) => void
3551
): void;
36-
export function and(
52+
53+
export function but(
3754
expression: RegExp | string,
3855
config: { timeout?: number },
3956
implementation: (...args: any[]) => void
4057
): void;
4158
export function but(
4259
expression: RegExp | string,
43-
config: { timeout?: number },
4460
implementation: (...args: any[]) => void
4561
): void;
62+
4663
export function defineStep(
4764
expression: RegExp | string,
4865
implementation: (...args: any[]) => void
4966
): void;
50-
export function defineParameterType(): void;
67+
export function defineParameterType(parameterType: Transform): void;
5168

5269
// Aliased versions of the above funcs.
5370
export function Given(

0 commit comments

Comments
 (0)