diff --git a/cucumber/cucumber-tests.ts b/cucumber/cucumber-tests.ts
index ba7ff1f72e..f8b5606070 100644
--- a/cucumber/cucumber-tests.ts
+++ b/cucumber/cucumber-tests.ts
@@ -1,4 +1,4 @@
-///
+///
function StepSample() {
type Callback = cucumber.CallbackStepDefinition;
@@ -19,7 +19,7 @@ function StepSample() {
callback();
});
- step.Given(/^I am on the Cucumber.js GitHub repository$/, function(callback) {
+ step.Given(/^I am on the Cucumber.js GitHub repository$/, function(callback:Callback) {
this.visit('https://github.com/cucumber/cucumber-js', callback);
});
@@ -27,7 +27,7 @@ function StepSample() {
callback.pending();
});
- step.Then(/^I should see "(.*)" as the page title$/, { timeout:60*1000}, function(title:string, callback) {
+ step.Then(/^I should see "(.*)" as the page title$/, { timeout:60*1000}, function(title:string, callback:Callback) {
var pageTitle = this.browser.text('title');
if (title === pageTitle) {
diff --git a/cucumber/cucumber.d.ts b/cucumber/cucumber.d.ts
index b70fbb6b46..75faeff7a5 100644
--- a/cucumber/cucumber.d.ts
+++ b/cucumber/cucumber.d.ts
@@ -31,7 +31,7 @@ declare module cucumber {
}
interface HookScenario{
- attach(text: string, mimeType?: string, callback?: (err?) => void): void;
+ attach(text: string, mimeType?: string, callback?: (err?:any) => void): void;
isFailed() : boolean;
}
@@ -48,7 +48,7 @@ declare module cucumber {
After(code: HookCode): void;
Around(code: AroundCode):void;
setDefaultTimeout(time:number): void;
- registerHandler(handlerOption:string, code:(event, callback:CallbackStepDefinition) =>void): void;
+ registerHandler(handlerOption:string, code:(event:any, callback:CallbackStepDefinition) =>void): void;
}
}