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

[Discussion] parse, toPlainJson, toPlainArray, toPlainMap, toPlainSet should not return undefined #166

Open
MatthiasKunnen opened this issue Feb 2, 2021 · 1 comment

Comments

@MatthiasKunnen
Copy link
Contributor

Returning undefined instead of throwing an error is an old approach and quite annoying because it requires a !== undefined check or non-null assertion on every call.

I would like these methods to throw instead of returning undefined.

This will not change that, for example, array elements that fail to deserialize get substituted with undefined.

@MatthiasKunnen
Copy link
Contributor Author

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

1 participant