express-generator-typescript 2.5.2 → 2.5.4
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.
|
@@ -35,7 +35,7 @@ export const isObj = _checkType<object>('object');
|
|
|
35
35
|
// Misc
|
|
36
36
|
export const parseObj = <U extends TSchema>(arg: U, onError?: TParseOnError<false>) =>
|
|
37
37
|
_parseObj<U, false, false, false>(arg, false, false, false, onError);
|
|
38
|
-
export const isEnumVal = <T>(arg: T) =>
|
|
38
|
+
export const isEnumVal = <T>(arg: T) => _isEnumVal<T, false, false>(arg, false, false);
|
|
39
39
|
|
|
40
40
|
// Util
|
|
41
41
|
export const transform = _transform;
|
|
@@ -85,7 +85,7 @@ function _isEnum(arg: unknown): arg is TEnum {
|
|
|
85
85
|
/**
|
|
86
86
|
* Check is value satisfies enum.
|
|
87
87
|
*/
|
|
88
|
-
function
|
|
88
|
+
function _isEnumVal<T,
|
|
89
89
|
O extends boolean,
|
|
90
90
|
N extends boolean
|
|
91
91
|
>(
|
|
@@ -150,7 +150,7 @@ function _checkType<T>(type: string) {
|
|
|
150
150
|
* Transform a value before checking it.
|
|
151
151
|
*/
|
|
152
152
|
function _transform<T>(
|
|
153
|
-
transFn:
|
|
153
|
+
transFn: (arg: unknown) => T,
|
|
154
154
|
vldt: ((arg: unknown) => arg is T),
|
|
155
155
|
): TValidateWithTransform<T> {
|
|
156
156
|
return (arg: unknown, cb?: (arg: T) => void): arg is T => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
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",
|