-
Notifications
You must be signed in to change notification settings - Fork 869
/
Copy pathtypes.ts
113 lines (112 loc) · 1.83 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import type * as http from 'http';
import { Options } from '../types';
/**
* @deprecated
*
* Will be removed in a future version.
*/
export interface LegacyOptions<TReq = http.IncomingMessage, TRes = http.ServerResponse>
extends Options<TReq, TRes> {
/**
* @deprecated
* Use `on.error` instead.
*
* @example
* ```js
* {
* on: {
* error: () => {}
* }
* ```
*/
onError?: (...args: any[]) => void; //httpProxy.ErrorCallback;
/**
* @deprecated
* Use `on.proxyRes` instead.
*
* @example
* ```js
* {
* on: {
* proxyRes: () => {}
* }
* ```
*/
onProxyRes?: (...args: any[]) => void; //httpProxy.ProxyResCallback;
/**
* @deprecated
* Use `on.proxyReq` instead.
*
* @example
* ```js
* {
* on: {
* proxyReq: () => {}
* }
* ```
*/
onProxyReq?: (...args: any[]) => void; //httpProxy.ProxyReqCallback;
/**
* @deprecated
* Use `on.proxyReqWs` instead.
*
* @example
* ```js
* {
* on: {
* proxyReqWs: () => {}
* }
* ```
*/
onProxyReqWs?: (...args: any[]) => void; //httpProxy.ProxyReqWsCallback;
/**
* @deprecated
* Use `on.open` instead.
*
* @example
* ```js
* {
* on: {
* open: () => {}
* }
* ```
*/
onOpen?: (...args: any[]) => void; //httpProxy.OpenCallback;
/**
* @deprecated
* Use `on.close` instead.
*
* @example
* ```js
* {
* on: {
* close: () => {}
* }
* ```
*/
onClose?: (...args: any[]) => void; //httpProxy.CloseCallback;
/**
* @deprecated
* Use `logger` instead.
*
* @example
* ```js
* {
* logger: console
* }
* ```
*/
logProvider?: any;
/**
* @deprecated
* Use `logger` instead.
*
* @example
* ```js
* {
* logger: console
* }
* ```
*/
logLevel?: any;
}