mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[cucumber] deprecate 'typeName' for 'name' (#22406)
See https://github.com/cucumber/cucumber-js/pull/904 Old and new name marked optional to preserve backward-compatibility, though specifying neither one will produce an error.
This commit is contained in:
parent
e2070bba6d
commit
c5fe3ac33e
@ -165,7 +165,13 @@ function StepSample() {
|
||||
defineParameterType({
|
||||
regexp: /particular/,
|
||||
transformer: s => s.toUpperCase(),
|
||||
typeName: 'param'
|
||||
typeName: 'param' // deprecated but still supported
|
||||
});
|
||||
|
||||
defineParameterType({
|
||||
regexp: /particularly/,
|
||||
transformer: s => s.toUpperCase(),
|
||||
name: 'param'
|
||||
});
|
||||
|
||||
Given('a {param} step', param => {
|
||||
|
||||
5
types/cucumber/index.d.ts
vendored
5
types/cucumber/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for cucumber-js 3.1
|
||||
// Type definitions for cucumber-js 3.2
|
||||
// Project: https://github.com/cucumber/cucumber-js
|
||||
// Definitions by: Abraão Alves <https://github.com/abraaoalves>
|
||||
// Jan Molak <https://github.com/jan-molak>
|
||||
@ -66,7 +66,8 @@ export type AroundCode = (scenario: HookScenarioResult, runScenario?: (error: st
|
||||
export interface Transform {
|
||||
regexp: RegExp;
|
||||
transformer(arg: string): any;
|
||||
typeName: string;
|
||||
name?: string;
|
||||
typeName?: string; // deprecated
|
||||
}
|
||||
|
||||
export interface HookOptions {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user