Socket
Socket
Sign inDemoInstall

@types/http-proxy

Package Overview
Dependencies
2
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.17.11 to 1.17.12

59

http-proxy/index.d.ts

@@ -13,8 +13,8 @@ // Type definitions for node-http-proxy 1.17

import * as net from "net";
import * as events from "events";
import * as http from "http";
import * as https from "https";
import * as events from "events";
import * as net from "net";
import * as stream from "stream";
import * as url from "url";
import * as stream from "stream";

@@ -36,3 +36,5 @@ interface ProxyTargetDetailed {

declare class Server<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> extends events.EventEmitter {
declare class Server<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>
extends events.EventEmitter
{
/**

@@ -90,3 +92,5 @@ * Creates the proxy server with specified options.

// tslint:disable:no-unnecessary-generics
static createProxyServer<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(options?: Server.ServerOptions): Server<TIncomingMessage, TServerResponse>;
static createProxyServer<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(
options?: Server.ServerOptions,
): Server<TIncomingMessage, TServerResponse>;

@@ -99,3 +103,5 @@ /**

// tslint:disable:no-unnecessary-generics
static createServer<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(options?: Server.ServerOptions): Server<TIncomingMessage, TServerResponse>;
static createServer<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(
options?: Server.ServerOptions,
): Server<TIncomingMessage, TServerResponse>;

@@ -108,3 +114,5 @@ /**

// tslint:disable:no-unnecessary-generics
static createProxy<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(options?: Server.ServerOptions): Server<TIncomingMessage, TServerResponse>;
static createProxy<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse>(
options?: Server.ServerOptions,
): Server<TIncomingMessage, TServerResponse>;

@@ -115,3 +123,6 @@ addListener(event: string, listener: () => void): this;

on(event: "start", listener: Server.StartCallback<TIncomingMessage, TServerResponse>): this;
on(event: "proxyReq", listener: Server.ProxyReqCallback<http.ClientRequest, TIncomingMessage, TServerResponse>): this;
on(
event: "proxyReq",
listener: Server.ProxyReqCallback<http.ClientRequest, TIncomingMessage, TServerResponse>,
): this;
on(event: "proxyRes", listener: Server.ProxyResCallback<TIncomingMessage, TServerResponse>): this;

@@ -127,3 +138,6 @@ on(event: "proxyReqWs", listener: Server.ProxyReqWsCallback<http.ClientRequest, TIncomingMessage>): this;

once(event: "start", listener: Server.StartCallback<TIncomingMessage, TServerResponse>): this;
once(event: "proxyReq", listener: Server.ProxyReqCallback<http.ClientRequest, TIncomingMessage, TServerResponse>): this;
once(
event: "proxyReq",
listener: Server.ProxyReqCallback<http.ClientRequest, TIncomingMessage, TServerResponse>,
): this;
once(event: "proxyRes", listener: Server.ProxyResCallback<TIncomingMessage, TServerResponse>): this;

@@ -210,3 +224,3 @@ once(event: "proxyReqWs", listener: Server.ProxyReqWsCallback<http.ClientRequest, TIncomingMessage>): this;

TServerResponse = http.ServerResponse,
> = (proxyReq: TClientRequest, req: TIncomingMessage, res: TServerResponse, options: ServerOptions) => void;
> = (proxyReq: TClientRequest, req: TIncomingMessage, res: TServerResponse, options: ServerOptions) => void;
type ProxyResCallback<TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (

@@ -224,3 +238,7 @@ proxyRes: TIncomingMessage,

) => void;
type EconnresetCallback<TError = Error, TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
type EconnresetCallback<
TError = Error,
TIncomingMessage = http.IncomingMessage,
TServerResponse = http.ServerResponse,
> = (
err: TError,

@@ -234,14 +252,19 @@ req: TIncomingMessage,

res: TServerResponse,
proxyRes: TIncomingMessage
proxyRes: TIncomingMessage,
) => void;
type OpenCallback = (proxySocket: net.Socket) => void;
type CloseCallback<TIncomingMessage = http.IncomingMessage> = (proxyRes: TIncomingMessage, proxySocket: net.Socket, proxyHead: any) => void;
type ErrorCallback<TError = Error, TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> = (
err: TError,
req: TIncomingMessage,
res: TServerResponse | net.Socket,
target?: ProxyTargetUrl,
type CloseCallback<TIncomingMessage = http.IncomingMessage> = (
proxyRes: TIncomingMessage,
proxySocket: net.Socket,
proxyHead: any,
) => void;
type ErrorCallback<TError = Error, TIncomingMessage = http.IncomingMessage, TServerResponse = http.ServerResponse> =
(
err: TError,
req: TIncomingMessage,
res: TServerResponse | net.Socket,
target?: ProxyTargetUrl,
) => void;
}
export = Server;
{
"name": "@types/http-proxy",
"version": "1.17.11",
"version": "1.17.12",
"description": "TypeScript definitions for node-http-proxy",

@@ -45,4 +45,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-proxy",

},
"typesPublisherContentHash": "09755a617424e003f20520df0294c295f1403b2e76833c83438eb45c953f9e51",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "c793ee08cc497092025f11e62b32c2ef880bb8b2e67419374091e6240a455631",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 25 Apr 2023 20:02:48 GMT
* Last updated: Sat, 16 Sep 2023 08:06:32 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc