Skip to content

Commit

Permalink
fix: variable generation with no enums
Browse files Browse the repository at this point in the history
Changed empty ZEUS_VARIABLES to empty object instead of never.
  • Loading branch information
alonbdmelio committed Jul 17, 2022
1 parent 7e53d6d commit dbaad5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TreeToTS/templates/variableTypes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ export const resolveVariableTypes = (rootNodes: ParserField[]): string => {
)
.map((rn) => `\t["${rn.name}"]: ${VALUETYPES}["${rn.name}"];`)
.join('\n');
return `type ${ZEUS_VARIABLES} = ${variableTypes ? `{\n${variableTypes}\n}` : 'never'}`;
return `type ${ZEUS_VARIABLES} = ${variableTypes ? `{\n${variableTypes}\n}` : '{}'}`;
};

0 comments on commit dbaad5e

Please sign in to comment.