quicktype-core 23.0.53 → 23.0.55
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.
|
@@ -561,6 +561,7 @@ function addTypesInSchema(resolver, typeBuilder, references, attributeProducers)
|
|
|
561
561
|
const isConst = schema.const !== undefined;
|
|
562
562
|
const typeSet = (0, collection_utils_1.definedMap)(schema.type, t => checkTypeList(t, loc));
|
|
563
563
|
function isTypeIncluded(name) {
|
|
564
|
+
var _a;
|
|
564
565
|
if (typeSet !== undefined && !typeSet.has(name)) {
|
|
565
566
|
return false;
|
|
566
567
|
}
|
|
@@ -580,7 +581,7 @@ function addTypesInSchema(resolver, typeBuilder, references, attributeProducers)
|
|
|
580
581
|
return enumArray.find(predicate) !== undefined;
|
|
581
582
|
}
|
|
582
583
|
if (isConst) {
|
|
583
|
-
return name ===
|
|
584
|
+
return name === ((_a = schema.type) !== null && _a !== void 0 ? _a : typeof schema.const);
|
|
584
585
|
}
|
|
585
586
|
return true;
|
|
586
587
|
}
|