@typeonly/validator
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -7,3 +7,3 @@ "use strict"; | ||
function createValidator(options) { | ||
if (loader_1.isSyncReadModulesOptions(options)) | ||
if ((0, loader_1.isSyncReadModulesOptions)(options)) | ||
return createValidatorSync(options); | ||
@@ -15,6 +15,6 @@ else | ||
function createValidatorSync(options) { | ||
return createValidatorFromModules(loader_1.loadModules(options), options); | ||
return createValidatorFromModules((0, loader_1.loadModules)(options), options); | ||
} | ||
async function createValidatorAsync(options) { | ||
return createValidatorFromModules(await loader_1.loadModules(options), options); | ||
return createValidatorFromModules(await (0, loader_1.loadModules)(options), options); | ||
} | ||
@@ -21,0 +21,0 @@ function createValidatorFromModules(modules, options) { |
@@ -37,3 +37,3 @@ "use strict"; | ||
valid: false, | ||
error: error_message_1.makeErrorMessage(result.unmatchs) | ||
error: (0, error_message_1.makeErrorMessage)(result.unmatchs) | ||
}; | ||
@@ -76,3 +76,3 @@ } | ||
if (type.group === "global") { | ||
if (helpers_1.hasAncestor(val, type.refName)) | ||
if ((0, helpers_1.hasAncestor)(val, type.refName)) | ||
return { valid: true }; | ||
@@ -79,0 +79,0 @@ const cause = `is not a ${type.refName}`; |
{ | ||
"name": "@typeonly/validator", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "An API to validate JSON data or JavaScript objects, using TypeScript typing definitions.", | ||
@@ -18,13 +18,13 @@ "author": "Paroi", | ||
"dependencies": { | ||
"@typeonly/loader": "^0.5.1" | ||
"@typeonly/loader": "^0.5.4" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^25.2.3", | ||
"@types/node": "^12.12.47", | ||
"jest": "^26.0.1", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "16", | ||
"jest": "^27.5.1", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^26.1.0", | ||
"ts-jest": "^27.1.4", | ||
"tslint": "^6.1.2", | ||
"typeonly": "^0.3.3", | ||
"typescript": "^3.9.5" | ||
"typeonly": "^0.4.5", | ||
"typescript": "^4.6.3" | ||
}, | ||
@@ -31,0 +31,0 @@ "main": "dist/api.js", |
@@ -94,4 +94,4 @@ import { Type } from "@typeonly/loader" | ||
default: | ||
throw new Error(`Unexpected type: ${type!.kind}`) | ||
throw new Error(`Unexpected type: ${(type as Type).kind}`) | ||
} | ||
} |
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
67605
Updated@typeonly/loader@^0.5.4