Skip to content

Commit

Permalink
Make transformer of defineParameterType optional (#2397)
Browse files Browse the repository at this point in the history
  • Loading branch information
badeball committed Apr 21, 2024
1 parent f18a004 commit f58f390
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber.

## [Unreleased]
### Fixed
- Type signature of `defineParameterType` correctly reflects `transformer` property's optionality.

## [10.5.0] - 2024-04-21
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/support_code_library_builder/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export interface IDefineTestRunHookOptions {
export interface IParameterTypeDefinition<T> {
name: string
regexp: readonly RegExp[] | readonly string[] | RegExp | string
transformer: (...match: string[]) => T
transformer?: (...match: string[]) => T
useForSnippets?: boolean
preferForRegexpMatch?: boolean
}
Expand Down

0 comments on commit f58f390

Please sign in to comment.