@teamkeel/wasm 0.102.8 → 0.102.11
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.
- package/dist/index.js +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7829,6 +7829,12 @@ var keel = () => {
|
|
|
7829
7829
|
const validate = (schemaString, opts) => __async(void 0, null, function* () {
|
|
7830
7830
|
const api = yield instantiate();
|
|
7831
7831
|
const result = api.validate(schemaString, opts);
|
|
7832
|
+
if (result.error) {
|
|
7833
|
+
return {
|
|
7834
|
+
errors: [result.error],
|
|
7835
|
+
ast: null
|
|
7836
|
+
};
|
|
7837
|
+
}
|
|
7832
7838
|
if (!result || !result.validationErrors) {
|
|
7833
7839
|
return {
|
|
7834
7840
|
errors: [],
|