express-generator-typescript 2.5.4 → 2.5.5
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.
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
// **** Types **** //
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
-
type TFunc = (...args: any[]) => any;
|
|
13
11
|
type TBasicObj = Record<string, unknown>;
|
|
14
12
|
type TEnum = Record<string, string | number>;
|
|
15
13
|
|
|
@@ -229,13 +227,13 @@ function _parseObj<
|
|
|
229
227
|
/**
|
|
230
228
|
* Validate the schema.
|
|
231
229
|
*/
|
|
232
|
-
function _parseObjCore(
|
|
230
|
+
function _parseObjCore<A>(
|
|
233
231
|
optional: boolean,
|
|
234
232
|
nullable: boolean,
|
|
235
|
-
isArr:
|
|
233
|
+
isArr: A,
|
|
236
234
|
schema: TSchema,
|
|
237
235
|
arg: unknown,
|
|
238
|
-
onError?:
|
|
236
|
+
onError?: TParseOnError<A>,
|
|
239
237
|
) {
|
|
240
238
|
// Check "undefined"
|
|
241
239
|
if (arg === undefined) {
|
|
@@ -272,9 +270,10 @@ function _parseObjCore(
|
|
|
272
270
|
}
|
|
273
271
|
}
|
|
274
272
|
return resp;
|
|
275
|
-
}
|
|
276
273
|
// Default
|
|
277
|
-
|
|
274
|
+
} else {
|
|
275
|
+
return _parseObjCoreHelper(schema, arg, onError as TParseOnError<false>);
|
|
276
|
+
}
|
|
278
277
|
}
|
|
279
278
|
|
|
280
279
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
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",
|