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 strictNullChecks #3791

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Enable strictNullChecks #3791

merged 1 commit into from
Jun 8, 2023

Conversation

luin
Copy link
Member

@luin luin commented Jun 5, 2023

We enable strictNullChecks to enable type safety and also make method return types include null values. Before this PR, methods like () => document.getElementById('myid') will have a return type of Element instead of Element | null.

This PR doesn't try to fix all typing errors for simplicity, instead, it fixed some of them, especially ones related to return types.

@luin luin marked this pull request as ready for review June 6, 2023 00:03
@luin luin requested a review from jhchen June 6, 2023 00:03
@luin luin merged commit 3d684d9 into develop Jun 8, 2023
@luin luin deleted the zh-strict-null branch June 8, 2023 05:47
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

1 participant