diff --git a/azure-mobile-apps/azure-mobile-apps-tests.ts b/azure-mobile-apps/azure-mobile-apps-tests.ts index f2a361d28..6ee440439 100644 --- a/azure-mobile-apps/azure-mobile-apps-tests.ts +++ b/azure-mobile-apps/azure-mobile-apps-tests.ts @@ -18,24 +18,24 @@ mobileApp.tables.add('todoitem', { mobileApp.api.add('customApi', { authorize: true, - post: function (req, res, next) { + post: function (req: any, res: any, next: any) { next(); }, - patch: [function (req, res, next) {}, function (req, res, next) {}] + patch: [function (req: any, res: any, next: any) {}, function (req: any, res: any, next: any) {}] }) -mobileApp.use(function (req, res, next) { +mobileApp.use(function (req: any, res: any, next: any) { next(); }); var table = mobileApp.table() table.read(function (context) { - return context.execute().then(function (result) { + return context.execute().then(function (result: any) { return result; }); }); -table.use(function (req, res, next) { +table.use(function (req: any, res: any, next: any) { next(new Error()); }); diff --git a/azure-mobile-apps/azure-mobile-apps.d.ts b/azure-mobile-apps/azure-mobile-apps.d.ts index 6e031049a..b6b7d49e7 100644 --- a/azure-mobile-apps/azure-mobile-apps.d.ts +++ b/azure-mobile-apps/azure-mobile-apps.d.ts @@ -131,7 +131,7 @@ declare module AzureMobileApps { platform?: string; basePath?: string; configFile?: string; - promiseConstructor?: (resolve: (result) => void, reject: (error) => void) => Thenable; + promiseConstructor?: (resolve: (result: any) => void, reject: (error: any) => void) => Thenable; apiRootPath?: string; tableRootPath?: string; notificationRootPath?: string;