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

fix: compile with exactOptionalPropertyTypes and noImplicitOverride #687

Merged
merged 3 commits into from
Mar 29, 2023

Conversation

bwbuchanan
Copy link
Contributor

TypeScript consumers of this addon that build with the TS options exactOptionalPropertyTypes or noImplicitOverride currently fail to compile.

This PR fixes the issue by explicitly marking overridden functions as override and adding an explicit | undefined for optional interface & class members that can be assigned as undefined.

@bwbuchanan
Copy link
Contributor Author

Perhaps this addon's tsconfig.json should also specify those options, to avoid future regressions?

In general, I think that addons should be built with the strictest possible constraints on their types, to avoid breaking downstream consumers that want to use stricter compilerOptions.

@cibernox
Copy link
Owner

I also think that would be ideal. Compile this as strictly as possible

@bwbuchanan
Copy link
Contributor Author

@cibernox I just pushed changes to make that happen.

@bwbuchanan
Copy link
Contributor Author

Hey @cibernox, can this get merged? Would be nice if I could switch back to mainline instead of having to use my private fork to keep glint happy.

@cibernox cibernox merged commit 0575ea0 into cibernox:master Mar 29, 2023
@cibernox
Copy link
Owner

Merged and published!

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.

2 participants