cucumber: Fix new --noImplicitAny error (#15983)

This commit is contained in:
Andy
2017-05-01 14:04:53 -07:00
committed by Mohamed Hegazy
parent 774e704935
commit 441bef5f52

View File

@@ -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);
});