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