Skip to content
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

optional thrift types are optional but not nullable in JS #47

Closed
phou87 opened this issue Jan 25, 2019 · 1 comment
Closed

optional thrift types are optional but not nullable in JS #47

phou87 opened this issue Jan 25, 2019 · 1 comment

Comments

@phou87
Copy link

phou87 commented Jan 25, 2019

For example, if I have:
optional string foo
in Thrift, this should map to:
foo: ?string
Or maybe
foo?: ?string
Instead of:
foo?: string

Currently, this prevents null from being a valid value for the field (in JS), whereas in Thrift null IS a valid value.

@ganemone
Copy link
Contributor

Sounds like foo?: ?string would be the most correct.

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

No branches or pull requests

2 participants