Skip to content

Commit

Permalink
Use 1 for true to save characters and match the old format
Browse files Browse the repository at this point in the history
  • Loading branch information
davepagurek committed Feb 10, 2024
1 parent bdedeee commit bb80892
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function typeObject(node) {
if (!node) return {};

if (node.type === 'OptionalType') {
return { optional: true, ...typeObject(node.expression) };
return { optional: 1, ...typeObject(node.expression) };
// TODO handle type UndefinedLiteral here
} else {
return { type: node.name };
Expand Down Expand Up @@ -109,11 +109,11 @@ for (const entry of allData) {
classes: {}
};
if (submodule) {
modules[module].submodules[submodule] = true;
modules[module].submodules[submodule] = 1;
submodules[submodule] = submodules[submodule] || {
name: submodule,
module,
is_submodule: true
is_submodule: 1
};
}
}
Expand Down Expand Up @@ -157,6 +157,7 @@ for (const entry of allData) {
description: descriptionString(entry.returns[0].description),
...typeObject(entry.returns[0].type).name
},
is_constructor: 1,
module,
submodule
};
Expand Down

0 comments on commit bb80892

Please sign in to comment.