Skip to content

[NTP Next] Remove Optional TS wrapper #45847

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

Open
zenparsing opened this issue May 5, 2025 · 0 comments
Open

[NTP Next] Remove Optional TS wrapper #45847

zenparsing opened this issue May 5, 2025 · 0 comments
Labels

Comments

@zenparsing
Copy link

Description

Currently, an Optional<T> wrapper is used on the front-end, primarily to help distinguish between an enum (number) value of zero and the lack of a value. (Otherwise, testing for the presence of a value with if (value) would be buggy.)

We might be able to work around the need for this wrapper by changing the enums in mojo, such that enums have a kNone with a value of zero (essentially making them always-optional).

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

No branches or pull requests

2 participants