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

Enhance Support for std::optional and Empty std::variant #214

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MangelSpec
Copy link

This pull request introduces mapping for std::optional return types and parameters, providing a more seamless integration with TypeScript's optional parameters.
The new mapping reflects the following TypeScript optional parameter syntax:

var: type | undefined
type? var

In addition, this commit extends std::variant support to include std::monostate, which is treated as an undefined value.

@MangelSpec MangelSpec marked this pull request as ready for review June 4, 2024 13:56
@pmed
Copy link
Owner

pmed commented Jun 5, 2024

Hi @MangelSpec

wow, thank you for adding this new featur, it looks really handy!

Maybe you have also a couple of use cases that may be added as test cases in test/test_convert.cpp?

I'm going to merge this PR right after fixing failing CI build, that isn’t green now on the master branch.

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

Successfully merging this pull request may close these issues.

None yet

2 participants