We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3da8b90 commit ecc99baCopy full SHA for ecc99ba
1 file changed
src/quicktype.options.ts
@@ -224,11 +224,19 @@ export async function makeQuicktypeOptions(
224
debugPrintSchemaResolving,
225
debugPrintTimes,
226
};
227
+
228
for (const flagName of inferenceFlagNames) {
229
const cliName = negatedInferenceFlagName(flagName);
- const v = options[cliName];
230
- if (typeof v === "boolean") {
231
- quicktypeOptions[flagName] = !v;
+ const negatedValue = options[cliName];
+ const positiveValue = options[flagName];
232
+ const value = !(positiveValue == null)
233
+ ? positiveValue
234
+ : !(negatedValue == null)
235
+ ? negatedValue
236
+ : undefined;
237
238
+ if (typeof value === "boolean") {
239
+ quicktypeOptions[flagName] = !value;
240
} else {
241
quicktypeOptions[flagName] = true;
242
}
0 commit comments