@sinclair/typebox
Advanced tools
Comparing version 0.34.2 to 0.34.3
@@ -35,2 +35,10 @@ "use strict"; | ||
function FromArray(schema, references, value) { | ||
// if the value is an array, we attempt to initialize it's elements | ||
if ((0, index_5.IsArray)(value)) { | ||
for (let i = 0; i < value.length; i++) { | ||
value[i] = Visit(schema.items, references, value[i]); | ||
} | ||
return value; | ||
} | ||
// ... otherwise use default initialization | ||
const defaulted = ValueOrDefault(schema, value); | ||
@@ -37,0 +45,0 @@ if (!(0, index_5.IsArray)(defaulted)) |
{ | ||
"name": "@sinclair/typebox", | ||
"version": "0.34.2", | ||
"version": "0.34.3", | ||
"description": "Json Schema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
1673708
27960