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