express-generator-typescript 2.4.12 → 2.4.14

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.
@@ -6,27 +6,14 @@
6
6
  import { Response, Request } from 'express';
7
7
 
8
8
 
9
- // **** Express Request **** //
9
+ // **** Express **** //
10
10
 
11
11
  type TPathParams = Record<string, string>;
12
12
 
13
- interface QryObj {
14
- [key: string]: string | string[] | undefined;
15
- }
16
-
17
- type TQueryParams<U = void> =
18
- U extends void
19
- ? QryObj
20
- : U extends QryObj
21
- ? U
22
- : never;
23
-
24
-
25
- export interface IReq<T = void, U extends QryObj | void = void> extends Request<TPathParams, void, T, TQueryParams<U>> {
13
+ export interface IReq<T = void> extends Request<TPathParams, void, T, TPathParams> {
26
14
  body: T;
27
15
  }
28
16
 
29
-
30
17
  export interface IRes extends Response {
31
18
  locals: Record<string, unknown>;
32
19
  }
@@ -31,29 +31,14 @@ import { Response, Request } from 'express';
31
31
  import { ISessionUser } from '@src/models/User';
32
32
 
33
33
 
34
- // **** Express Request **** //
34
+ // **** Express **** //
35
35
 
36
36
  type TPathParams = Record<string, string>;
37
37
 
38
- interface QryObj {
39
- [key: string]: string | string[] | undefined;
40
- }
41
-
42
- type TQueryParams<U = void> =
43
- U extends void
44
- ? QryObj
45
- : U extends QryObj
46
- ? U
47
- : never;
48
-
49
-
50
- export interface IReq<T = void, U extends QryObj | void = void> extends Request<TPathParams, void, T, TQueryParams<U>> {
38
+ export interface IReq<T = void> extends Request<TPathParams, void, T, TPathParams> {
51
39
  body: T;
52
40
  }
53
41
 
54
-
55
- // **** Express Response **** //
56
-
57
42
  interface ILocals {
58
43
  sessionUser: ISessionUser;
59
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-generator-typescript",
3
- "version": "2.4.12",
3
+ "version": "2.4.14",
4
4
  "description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
5
5
  "scripts": {
6
6
  "express-generator-typescript": "node bin/cli.js",