You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated code will produce the field with type: boolean instead of type: false.
Generated code from above sample:
exporttypeBooleanConstFalse={value: boolean;};
What were you expecting to happen?
The type should be generated with type: false.
Expected code from above sample:
exporttypeBooleanConstFalse={value: false;};
Any other comments?
Problem is here, if const is false, then this if statement will evaluate to false and thus not set the value. We just need to change the check to if (itemWithConst.const !== undefined). The same probably happens for integers with const: 0.
What are the steps to reproduce this issue?
const: false
in a propertyExample schema:
What happens?
The generated code will produce the field with
type: boolean
instead oftype: false
.Generated code from above sample:
What were you expecting to happen?
The type should be generated with
type: false
.Expected code from above sample:
Any other comments?
Problem is here, if
const
isfalse
, then thisif
statement will evaluate tofalse
and thus not set thevalue
. We just need to change the check toif (itemWithConst.const !== undefined)
. The same probably happens for integers withconst: 0
.What versions are you using?
The text was updated successfully, but these errors were encountered: