mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
cucumber: Fix new --noImplicitAny error (#15983)
This commit is contained in:
@@ -7,7 +7,7 @@ function StepSample() {
|
||||
type HookScenarioResult = cucumber.HookScenarioResult;
|
||||
|
||||
cucumber.defineSupportCode(function ({setWorldConstructor, defineParameterType, After, Around, Before, registerHandler, Given, When, Then}) {
|
||||
setWorldConstructor(function ({attach, parameters}) {
|
||||
setWorldConstructor(function ({attach, parameters}: any) {
|
||||
this.attach = attach;
|
||||
this.parameters = parameters;
|
||||
this.visit = function (url: string, callback: Callback) {
|
||||
@@ -19,7 +19,7 @@ function StepSample() {
|
||||
console.log(scenarioResult.status === "failed");
|
||||
callback();
|
||||
});
|
||||
|
||||
|
||||
Before({ timeout: 1000 }, function (scenarioResult: HookScenarioResult, callback: Callback) {
|
||||
console.log(scenarioResult.status === "failed");
|
||||
callback();
|
||||
@@ -35,7 +35,7 @@ function StepSample() {
|
||||
console.log("After");
|
||||
callback();
|
||||
});
|
||||
|
||||
|
||||
After({ timeout: 1000 }, (scenarioResult: HookScenarioResult, callback?: Callback) => {
|
||||
console.log("After");
|
||||
callback();
|
||||
@@ -48,7 +48,7 @@ function StepSample() {
|
||||
Given(/^a variable set to (\d+)$/, (x: string) => {
|
||||
console.log("the number is: " + x);
|
||||
});
|
||||
|
||||
|
||||
Given(/^a variable set to (\d+)$/, (x: number) => {
|
||||
console.log(typeof x);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user