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

Enable exactOptionalPropertyTypes #543

Closed
wants to merge 1 commit into from

Conversation

dimitropoulos
Copy link
Contributor

To quote from the TypeScript team lead:

If we were to start TypeScript over again, we believe the behavior of strictOptionalProperties would be on by default
microsoft/TypeScript#44421

This configuration brings a pretty critical element to the type-soundness (critical because it drastically changes the behavior of operations that check for keys). SameValueZero checks remain unchanged, anyway, so there's basically no downside to having this rule enabled. The microsoft/TypeScript#43947 from Anders provides some more context, as well.

Thankfully, this codebase was already pretty close to the mark, with only a few little minor things to update to increase strictness. Note a similar PR: bufbuild/protobuf-es#431

@dimitropoulos dimitropoulos changed the title enables exactOptionalPropertyTypes Enables exactOptionalPropertyTypes Mar 16, 2023
@bufdev bufdev changed the title Enables exactOptionalPropertyTypes Enable exactOptionalPropertyTypes Apr 4, 2023
@CLAassistant
Copy link

CLAassistant commented Apr 29, 2023

CLA assistant check
All committers have signed the CLA.

@timostamm
Copy link
Member

Let's enable exactOptionalPropertyTypes when it becomes the default with TSC.

@timostamm timostamm closed this Jun 13, 2023
@timostamm timostamm deleted the dimitri/exactOptionalPropertyTypes branch June 22, 2023 11:34
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

3 participants