Comparing version 3.8.0 to 3.9.0
@@ -529,3 +529,3 @@ 'use strict'; | ||
const specKeys = Object.keys(props); | ||
return makeValidator({ | ||
const validator = makeValidator({ | ||
test: (value, state) => { | ||
@@ -571,2 +571,5 @@ if (typeof value !== `object` || value === null) | ||
}); | ||
return Object.assign(validator, { | ||
properties: props, | ||
}); | ||
} | ||
@@ -573,0 +576,0 @@ /** |
@@ -160,3 +160,5 @@ import { AnyStrictValidator, InferType, StrictValidator } from '../types'; | ||
extra?: UnknownValidator | null; | ||
}): StrictValidator<unknown, ObjectType<{ [P in keyof T]: InferType<T[P]>; } & InferType<UnknownValidator>>>; | ||
}): import("../types").StrictTest<unknown, ObjectType<{ [P in keyof T]: InferType<T[P]>; } & InferType<UnknownValidator>>> & import("../types").Trait<ObjectType<{ [P in keyof T]: InferType<T[P]>; } & InferType<UnknownValidator>>> & { | ||
properties: T; | ||
}; | ||
/** | ||
@@ -177,3 +179,5 @@ * Create a validator that only returns true when the tested value is an | ||
[P in keyof T]: AnyStrictValidator; | ||
}>(props: T): StrictValidator<unknown, ObjectType<{ [P in keyof T]: InferType<T[P]>; } & Record<string, unknown>>>; | ||
}>(props: T): import("../types").StrictTest<unknown, ObjectType<{ [P in keyof T]: InferType<T[P]>; } & Record<string, unknown>>> & import("../types").Trait<ObjectType<{ [P in keyof T]: InferType<T[P]>; } & Record<string, unknown>>> & { | ||
properties: T; | ||
}; | ||
/** | ||
@@ -180,0 +184,0 @@ * Create a validator that only returns true when the tested value is an |
{ | ||
"name": "typanion", | ||
"version": "3.8.0", | ||
"version": "3.9.0", | ||
"main": "lib/index", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125121
2917