@sinclair/typebox 0.26.4 → 0.26.5
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/compiler/compiler.js +1 -1
- package/package.json +1 -1
package/compiler/compiler.js
CHANGED
|
@@ -170,7 +170,7 @@ var TypeCompiler;
|
|
|
170
170
|
// Polices
|
|
171
171
|
// -------------------------------------------------------------------
|
|
172
172
|
function IsExactOptionalProperty(value, key, expression) {
|
|
173
|
-
return index_2.TypeSystem.ExactOptionalPropertyTypes ? `('${key}' in ${value} ? ${expression} : true)` : `(${value
|
|
173
|
+
return index_2.TypeSystem.ExactOptionalPropertyTypes ? `('${key}' in ${value} ? ${expression} : true)` : `(${MemberExpression.Encode(value, key)} !== undefined ? ${expression} : true)`;
|
|
174
174
|
}
|
|
175
175
|
function IsObjectCheck(value) {
|
|
176
176
|
return !index_2.TypeSystem.AllowArrayObjects ? `(typeof ${value} === 'object' && ${value} !== null && !Array.isArray(${value}))` : `(typeof ${value} === 'object' && ${value} !== null)`;
|