-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean field sets the attribute to be optional #73
Comments
if you are sure about it you can raise a PR, but I honestly would not mind to keep it as is |
xaverfleer
pushed a commit
to xaverfleer/storyblok-generate-ts
that referenced
this issue
Sep 18, 2024
…ned` for boolean fields Refs: dohomi#73
xaverfleer
pushed a commit
to xaverfleer/storyblok-generate-ts
that referenced
this issue
Sep 18, 2024
…ned` for boolean fields Refs: dohomi#73
xaverfleer
pushed a commit
to xaverfleer/storyblok-generate-ts
that referenced
this issue
Sep 18, 2024
…ned` for boolean fields Refs: dohomi#73
xaverfleer
pushed a commit
to xaverfleer/storyblok-generate-ts
that referenced
this issue
Sep 18, 2024
…` for boolean fields Refs: dohomi#73
Awesome, thank you. I created PR #75 for this. Let me know, how I can still improve it, if you prefer it to be adapted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With a boolean field, the generated type is
Which means the field can either be
true
,false
orundefined
.In Storyblok, when we set such a field, there's no option to set whether it is required or not, like with other field types. Moreover, there's a default value that can be either
true
orfalse
.With this in mind, shouldn't the generated type strictly be a boolean? e.g.:
The text was updated successfully, but these errors were encountered: