Skip to content

fix(gen): better typing for optional types in typescript client #1876

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

melkstam
Copy link
Contributor

@melkstam melkstam commented Apr 17, 2025

This aims to solve the issue described in #1623.

It's still not a perfect solution. For example, it does not correctly handle that when omitempty is present, it is never null, and when omitempty is NOT present, it is never undefined when returned from the JSON marshaller.

I don't know if this opens for any other issues, so let me know if it needs some rework!

@encore-cla
Copy link

encore-cla bot commented Apr 17, 2025

All committers have signed the CLA.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant