quicktype-core 23.3.11 → 23.3.12
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.
|
@@ -1258,7 +1258,7 @@ class CPlusPlusRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
|
|
|
1258
1258
|
onFirst = false;
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
|
-
this.emitLine('else { throw std::runtime_error("
|
|
1261
|
+
this.emitLine('else { throw std::runtime_error("Cannot deserialize to enumeration \\"', enumName, '\\""); }');
|
|
1262
1262
|
});
|
|
1263
1263
|
this.ensureBlankLine();
|
|
1264
1264
|
this.emitBlock([
|
|
@@ -251,7 +251,10 @@ class DartRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
|
|
|
251
251
|
(0, Support_1.defined)(this._enumValues.get(enumType)),
|
|
252
252
|
".map[",
|
|
253
253
|
dynamic,
|
|
254
|
-
this._options.nullSafety
|
|
254
|
+
this._options.nullSafety &&
|
|
255
|
+
(!isNullable || this._options.requiredProperties)
|
|
256
|
+
? "]!"
|
|
257
|
+
: "]",
|
|
255
258
|
];
|
|
256
259
|
}, (unionType) => {
|
|
257
260
|
const maybeNullable = (0, TypeUtils_1.nullableFromUnion)(unionType);
|