diff --git a/HttpTest/index.ts b/HttpTest/index.ts index 721b926..af1980a 100644 --- a/HttpTest/index.ts +++ b/HttpTest/index.ts @@ -1,11 +1,9 @@ -import { AzureFunction, Context, HttpRequest } from "@azure/functions"; - import * as express from "express"; import createAzureFunctionHandler from "../src/createAzureFunctionsHandler"; const app = express(); -app.get("/api/HttpTest/ping", (req, res) => { +app.get("/api/HttpTest/ping", (_, res) => { res.send("PONG"); }); diff --git a/src/IncomingMessage.ts b/src/IncomingMessage.ts index 60865be..7b43efe 100644 --- a/src/IncomingMessage.ts +++ b/src/IncomingMessage.ts @@ -73,6 +73,7 @@ export default class IncomingMessage extends EventEmitter { headers: req.headers || {}, // Should always have a headers object resume: NOOP, socket: { destroy: NOOP }, + // tslint:disable-next-line: no-any url: (req as any).originalUrl }); } diff --git a/src/OutgoingMessage.ts b/src/OutgoingMessage.ts index 8a33359..72c1661 100644 --- a/src/OutgoingMessage.ts +++ b/src/OutgoingMessage.ts @@ -42,8 +42,7 @@ export default class OutgoingMessage extends NativeOutgoingMessage { // See https://github.com/expressjs/express/blob/master/lib/middleware/init.js#L29 public end: NativeOutgoingMessage["end"] = ( // tslint:disable-next-line: no-any - chunkOrCb?: any, - encodingOrCb?: string | (() => void) + chunkOrCb?: any ) => { // 1. Write head this.writeHead(this.statusCode); // Make jshttp/on-headers able to trigger diff --git a/src/createAzureFunctionsHandler.ts b/src/createAzureFunctionsHandler.ts index 4a79101..31bbeb7 100644 --- a/src/createAzureFunctionsHandler.ts +++ b/src/createAzureFunctionsHandler.ts @@ -1,7 +1,7 @@ import { Context } from "@azure/functions"; import { Application } from "express"; -import ExpressAdapter, { RequestListener } from "./ExpressAdapter"; +import ExpressAdapter from "./ExpressAdapter"; /** * Creates a function ready to be exposed to Azure Function for request handling.