tsbuffer-validator
Advanced tools
Comparing version 2.0.8 to 2.1.0-dev.0
/*! | ||
* TSBuffer Validator v2.0.8 | ||
* TSBuffer Validator v2.1.0-dev.0 | ||
* ----------------------------------------- | ||
@@ -4,0 +4,0 @@ * MIT LICENSE |
15
index.js
/*! | ||
* TSBuffer Validator v2.0.8 | ||
* TSBuffer Validator v2.1.0-dev.0 | ||
* ----------------------------------------- | ||
@@ -80,2 +80,15 @@ * MIT LICENSE | ||
} | ||
else if (schema.type === tsbufferSchema.SchemaType.Keyof) { | ||
var flatInterface = this.getFlatInterfaceSchema(schema.target); | ||
return { | ||
type: 'Union', | ||
members: flatInterface.properties.map(function (v, i) { return ({ | ||
id: i, | ||
type: { | ||
type: tsbufferSchema.SchemaType.Literal, | ||
literal: v.name | ||
} | ||
}); }) | ||
}; | ||
} | ||
else { | ||
@@ -82,0 +95,0 @@ return schema; |
{ | ||
"name": "tsbuffer-validator", | ||
"version": "2.0.8", | ||
"version": "2.1.0-dev.0", | ||
"description": "Validator for TSBuffer values", | ||
@@ -44,3 +44,3 @@ "main": "index.js", | ||
"k8w-extend-native": "^1.4.6", | ||
"tsbuffer-schema": "^2.1.1", | ||
"tsbuffer-schema": "^2.2.0-dev.0", | ||
"tslib": "^2.3.1" | ||
@@ -64,13 +64,13 @@ }, | ||
"devDependencies": { | ||
"@microsoft/api-documenter": "^7.14.1", | ||
"@microsoft/api-documenter": "^7.15.1", | ||
"@microsoft/api-extractor": "^7.19.4", | ||
"@types/mocha": "^8.2.3", | ||
"@types/node": "^15.14.9", | ||
"mocha": "^9.1.3", | ||
"mocha": "^9.2.0", | ||
"nyc": "^15.1.0", | ||
"rollup": "^2.63.0", | ||
"rollup-plugin-typescript2": "^0.31.1", | ||
"rollup": "^2.67.0", | ||
"rollup-plugin-typescript2": "^0.31.2", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4.5.4" | ||
"typescript": "^4.5.5" | ||
} | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
107591
2292
1
Updatedtsbuffer-schema@^2.2.0-dev.0