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

chore: [#0] Improve type accuracy, strict mode compatibility and JSDoc documentation #1677

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

wojtekmaj
Copy link
Contributor

Fixes several easy to fix issues with TypeScript types accuracy, strict mode compatibility and JSDoc documentation.

While in non-strict mode, which you currently use, you will see no difference, you're 10% closer to enabling strict mode now!

Before, in strict mode:

Found 2243 errors. Watching for file changes.

After, in strict mode:

Found 2041 errors. Watching for file changes.

Most common issues:

  • null not accepted where some value or undefined was accepted
  • (arg: any) => void | null does NOT mean the same as ((arg: any) => void) | null - the former means "a function that returns nothing or returns null", the latter - "a function that returns nothing, or no function (null)"

@wojtekmaj wojtekmaj requested a review from capricorn86 as a code owner January 8, 2025 11:33
Copy link
Owner

@capricorn86 capricorn86 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @wojtekmaj! ⭐

Many good catches. Enabling strict mode would be great. Hopefully it can be prioritized soon.

@capricorn86 capricorn86 merged commit 3218bf9 into capricorn86:master Jan 8, 2025
4 checks passed
@wojtekmaj wojtekmaj deleted the ts-improvements branch January 9, 2025 08: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.

2 participants