Skip to content

Commit f58f390

Browse files
authored
Make transformer of defineParameterType optional (#2397)
1 parent f18a004 commit f58f390

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber.
99

1010
## [Unreleased]
11+
### Fixed
12+
- Type signature of `defineParameterType` correctly reflects `transformer` property's optionality.
1113

1214
## [10.5.0] - 2024-04-21
1315
### Added

src/support_code_library_builder/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export interface IDefineTestRunHookOptions {
7171
export interface IParameterTypeDefinition<T> {
7272
name: string
7373
regexp: readonly RegExp[] | readonly string[] | RegExp | string
74-
transformer: (...match: string[]) => T
74+
transformer?: (...match: string[]) => T
7575
useForSnippets?: boolean
7676
preferForRegexpMatch?: boolean
7777
}

0 commit comments

Comments
 (0)