diff --git a/src/resources/http.ts b/src/resources/http.ts index c372c42..eed6fe9 100644 --- a/src/resources/http.ts +++ b/src/resources/http.ts @@ -17,10 +17,15 @@ import { HttpClient } from '@nitric/proto/http/v1/http_grpc_pb'; import { SERVICE_BIND } from '../constants'; import * as grpc from '@grpc/grpc-js'; import { ClientMessage, HttpProxyRequest } from '@nitric/proto/http/v1/http_pb'; -import { Server } from 'http'; -import { Http2SecureServer, Http2Server } from 'http2'; -type ServerType = Server | Http2Server | Http2SecureServer; +interface ServerType { + on: ( + eventType: 'close', + callback: () => void, + options?: Record + ) => void; + close?: () => void; +} type ListenerFunction = | ((port: number, callback?: () => void) => ServerType | Promise)