From 646ee3ad7fd8a73d68013e5b7fb9d35079751909 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 20 Jan 2021 13:01:31 -0700 Subject: [PATCH] refactor: correct type signature in app.ts --- src/node/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node/app.ts b/src/node/app.ts index aa18b084..b969a2fb 100644 --- a/src/node/app.ts +++ b/src/node/app.ts @@ -24,7 +24,7 @@ export const createApp = async (args: DefaultedArgs): Promise<[Express, Express, : http.createServer(app) let resolved = false - await new Promise(async (resolve2, reject) => { + await new Promise(async (resolve2, reject) => { const resolve = () => { resolved = true resolve2() @@ -46,10 +46,10 @@ export const createApp = async (args: DefaultedArgs): Promise<[Express, Express, logger.error(error.message) } } - server.listen(args.socket, () => resolve(server)) + server.listen(args.socket, resolve) } else { // [] is the correct format when using :: but Node errors with them. - server.listen(args.port, args.host.replace(/^\[|\]$/g, ""), () => resolve(server)) + server.listen(args.port, args.host.replace(/^\[|\]$/g, ""), resolve) } })