diff --git a/keyserver/flow-typed/npm/express_v4.17.x.js b/keyserver/flow-typed/npm/express_v4.17.x.js --- a/keyserver/flow-typed/npm/express_v4.17.x.js +++ b/keyserver/flow-typed/npm/express_v4.17.x.js @@ -357,7 +357,10 @@ declare module.exports: { // If you try to call like a function, it will use this signature - (): express$Application, + < + Req: express$Request = express$Request, + Res: express$Response = express$Response, + >(): express$Application, json: (opts: ?JsonOptions) => express$Middleware<>, // `static` property on the function static: (root: string, options?: Object) => express$Middleware, diff --git a/services/electron-update-server/flow-typed/npm/express_v4.17.x.js b/services/electron-update-server/flow-typed/npm/express_v4.17.x.js --- a/services/electron-update-server/flow-typed/npm/express_v4.17.x.js +++ b/services/electron-update-server/flow-typed/npm/express_v4.17.x.js @@ -357,7 +357,10 @@ declare module.exports: { // If you try to call like a function, it will use this signature - (): express$Application, + < + Req: express$Request = express$Request, + Res: express$Response = express$Response, + >(): express$Application, json: (opts: ?JsonOptions) => express$Middleware<>, // `static` property on the function static: (root: string, options?: Object) => express$Middleware, diff --git a/services/electron-update-server/flow-typed/npm/hazel-server_vx.x.x.js b/services/electron-update-server/flow-typed/npm/hazel-server_vx.x.x.js --- a/services/electron-update-server/flow-typed/npm/hazel-server_vx.x.x.js +++ b/services/electron-update-server/flow-typed/npm/hazel-server_vx.x.x.js @@ -4,6 +4,8 @@ // flow-typed version: <>/hazel-server_v5.1.1/flow_v0.198.1 declare module 'hazel-server' { + import type { $Response, $Request } from 'express'; + declare export default function hazel(options: { interval?: number, repository?: string, @@ -11,5 +13,5 @@ pre?: boolean, token?: string, url?: string, - }): (Request, Response) => void; + }): ($Request, $Response) => void; } diff --git a/services/electron-update-server/index.js b/services/electron-update-server/index.js --- a/services/electron-update-server/index.js +++ b/services/electron-update-server/index.js @@ -1,6 +1,7 @@ // @flow import express from 'express'; +import type { $Request, $Response } from 'express'; import hazel from 'hazel-server'; const hazelServer = hazel({ @@ -11,7 +12,7 @@ }); const app = express(); -app.all('*', (req, res) => { +app.all('*', (req: $Request, res: $Response) => { hazelServer(req, res); });