You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of #1176, I noticed that we currently perform a lot of checks and nullish coalescing that are actually not really necessary based on our current typings. In some cases, this makes the code less readable, in other cases this can pave the way for potential bugs since some possible null values are hidden behind typecasts.
eslint provides the rule @typescript-eslint/no-unnecessary-condition which makes it possible to detect and fix these problems. As another step toward more type safety, this rule could be added on a per-package basis again, which should ultimately make the library more reliable.
The text was updated successfully, but these errors were encountered:
In the context of #1176, I noticed that we currently perform a lot of checks and nullish coalescing that are actually not really necessary based on our current typings. In some cases, this makes the code less readable, in other cases this can pave the way for potential bugs since some possible null values are hidden behind typecasts.
eslint
provides the rule@typescript-eslint/no-unnecessary-condition
which makes it possible to detect and fix these problems. As another step toward more type safety, this rule could be added on a per-package basis again, which should ultimately make the library more reliable.The text was updated successfully, but these errors were encountered: