@umijs/bundler-utils 4.0.41 → 4.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -131,9 +131,11 @@ export interface IRouterMatcher<
131
131
  ReqQuery = ParsedQs,
132
132
  Locals extends Record<string, any> = Record<string, any>
133
133
  >(
134
- // tslint:disable-next-line no-unnecessary-generics (it's used as the default type parameter for P)
134
+ // (it's used as the default type parameter for P)
135
+ // eslint-disable-next-line no-unnecessary-generics
135
136
  path: Route,
136
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
137
+ // (This generic is meant to be passed explicitly.)
138
+ // eslint-disable-next-line no-unnecessary-generics
137
139
  ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
138
140
  ): T;
139
141
  <
@@ -144,9 +146,11 @@ export interface IRouterMatcher<
144
146
  ReqQuery = ParsedQs,
145
147
  Locals extends Record<string, any> = Record<string, any>
146
148
  >(
147
- // tslint:disable-next-line no-unnecessary-generics (it's used as the default type parameter for P)
149
+ // (it's used as the default type parameter for P)
150
+ // eslint-disable-next-line no-unnecessary-generics
148
151
  path: Path,
149
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
152
+ // (This generic is meant to be passed explicitly.)
153
+ // eslint-disable-next-line no-unnecessary-generics
150
154
  ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
151
155
  ): T;
152
156
  <
@@ -157,7 +161,8 @@ export interface IRouterMatcher<
157
161
  Locals extends Record<string, any> = Record<string, any>
158
162
  >(
159
163
  path: PathParams,
160
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
164
+ // (This generic is meant to be passed explicitly.)
165
+ // eslint-disable-next-line no-unnecessary-generics
161
166
  ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
162
167
  ): T;
163
168
  <
@@ -168,7 +173,8 @@ export interface IRouterMatcher<
168
173
  Locals extends Record<string, any> = Record<string, any>
169
174
  >(
170
175
  path: PathParams,
171
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
176
+ // (This generic is meant to be passed explicitly.)
177
+ // eslint-disable-next-line no-unnecessary-generics
172
178
  ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
173
179
  ): T;
174
180
  (path: PathParams, subApplication: Application): T;
@@ -184,7 +190,8 @@ export interface IRouterHandler<T, Route extends string = string> {
184
190
  ReqQuery = ParsedQs,
185
191
  Locals extends Record<string, any> = Record<string, any>
186
192
  >(
187
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
193
+ // (This generic is meant to be passed explicitly.)
194
+ // eslint-disable-next-line no-unnecessary-generics
188
195
  ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
189
196
  ): T;
190
197
  <
@@ -194,7 +201,8 @@ export interface IRouterHandler<T, Route extends string = string> {
194
201
  ReqQuery = ParsedQs,
195
202
  Locals extends Record<string, any> = Record<string, any>
196
203
  >(
197
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
204
+ // (This generic is meant to be passed explicitly.)
205
+ // eslint-disable-next-line no-unnecessary-generics
198
206
  ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
199
207
  ): T;
200
208
  <
@@ -204,7 +212,8 @@ export interface IRouterHandler<T, Route extends string = string> {
204
212
  ReqQuery = ParsedQs,
205
213
  Locals extends Record<string, any> = Record<string, any>
206
214
  >(
207
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
215
+ // (This generic is meant to be passed explicitly.)
216
+ // eslint-disable-next-line no-unnecessary-generics
208
217
  ...handlers: Array<RequestHandler<P, ResBody, ReqBody, ReqQuery, Locals>>
209
218
  ): T;
210
219
  <
@@ -214,7 +223,8 @@ export interface IRouterHandler<T, Route extends string = string> {
214
223
  ReqQuery = ParsedQs,
215
224
  Locals extends Record<string, any> = Record<string, any>
216
225
  >(
217
- // tslint:disable-next-line no-unnecessary-generics (This generic is meant to be passed explicitly.)
226
+ // (This generic is meant to be passed explicitly.)
227
+ // eslint-disable-next-line no-unnecessary-generics
218
228
  ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, Locals>>
219
229
  ): T;
220
230
  }
@@ -914,7 +924,7 @@ export interface Response<
914
924
  headersSent: boolean;
915
925
 
916
926
  /** Get value for header `field`. */
917
- get(field: string): string;
927
+ get(field: string): string|undefined;
918
928
 
919
929
  /** Clear cookie `name`. */
920
930
  clearCookie(name: string, options?: CookieOptions): this;
@@ -978,6 +988,7 @@ export interface Response<
978
988
  *
979
989
  * Examples:
980
990
  *
991
+ * res.redirect('back');
981
992
  * res.redirect('/foo/bar');
982
993
  * res.redirect('http://example.com');
983
994
  * res.redirect(301, 'http://example.com');
@@ -986,6 +997,7 @@ export interface Response<
986
997
  */
987
998
  redirect(url: string): void;
988
999
  redirect(status: number, url: string): void;
1000
+ /** @deprecated use res.redirect(status, url) instead */
989
1001
  redirect(url: string, status: number): void;
990
1002
 
991
1003
  /**