-
Notifications
You must be signed in to change notification settings - Fork 127
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
A couple of suggestions #509
Comments
|
@eranhirsch I opened a PR with Regarding
I think that
TypeScript and ESLint don’t offer a complete guarantee here, as mentioned above, in the case of a long-running (stale) frontend communicating with a recently-updated backend. In addition, there are cases not yet understood by ESLint such as mentioned here, where Just adding this FYI, I won’t go and open a PR considering that it’s not wanted. |
Hi,
Thanks for this library, it works well. I recently moved away from using Ramda because I didn’t like that the keys used by
omit
weren’t narrowly typed.As part of that migration, I had to move a couple of functions that are not implemented by Remeda into my own repository. I think these could be well-suited for inclusion:
In addition, I find the following utility function useful, because their return value is typed as a string literal, if called with a string literal argument:
Finally,
unreachable
can be a handy function to enforce exhaustiveness in aswitch
/case
, either when you don’t usetypescript-eslint
to do this check for you, or if you want to have absolute certainty that there will be no fallthrough (e.g. in case of a stale frontend receiving data from a freshly updated backend). You can use this function in thedefault
case, to ensure via the type system that you handled all cases in thecase
s above:The text was updated successfully, but these errors were encountered: