We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dc2d70 commit f981df7Copy full SHA for f981df7
src/resources/http.ts
@@ -17,10 +17,15 @@ import { HttpClient } from '@nitric/proto/http/v1/http_grpc_pb';
17
import { SERVICE_BIND } from '../constants';
18
import * as grpc from '@grpc/grpc-js';
19
import { ClientMessage, HttpProxyRequest } from '@nitric/proto/http/v1/http_pb';
20
-import { Server } from 'http';
21
-import { Http2SecureServer, Http2Server } from 'http2';
22
23
-type ServerType = Server | Http2Server | Http2SecureServer;
+interface ServerType {
+ on: (
+ eventType: 'close',
24
+ callback: () => void,
25
+ options?: Record<string, any>
26
+ ) => void;
27
+ close?: () => void;
28
+}
29
30
type ListenerFunction =
31
| ((port: number, callback?: () => void) => ServerType | Promise<ServerType>)
0 commit comments