Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make transformer of defineParameterType optional #2397

Merged
merged 2 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading