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

Use null for computing rather than undefined #235

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

prophile
Copy link
Contributor

@prophile prophile commented Aug 1, 2024

Previously we used undefined here, and that's what's currently returned by currentComputed() in the Polyfill. However, null is what is specified in the TypeScript type definition, and prevailing opinion on the Discord suggests it's a better choice than undefined as it clarifies intentionality better.

If/once merged, we'll need to alter the polyfill and tests.

This is consistent with the type specified for `currentComputed()`.
Copy link
Member

@littledan littledan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good but also let's remove currentComputed

@littledan littledan merged commit 3490f52 into tc39:main Aug 6, 2024
1 check passed
@rektide
Copy link

rektide commented Aug 12, 2024

@littledan it looks like currentComputed did get included here.

Personally I'm very much in favor of it - i love offering the affordance to get this stuff, open the option! - but it definitely wasn't what's described in the ticket.

Just want to re-share awareness that this currentComputed did get added.

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.

3 participants