Fixed types of Either.fromTry
Addresses comment: https://github.com/JSMonk/sweet-monads/pull/53#issuecomment-1494852272
Hey. It looks like the typing is good now because you can provide the types by generic types application. Why did you decide to change them?
I saw the issue, but, let's just change the documentation. Could I ask you to do the separated PR?
@JSMonk I've updated readme within that PR. Did I miss some part of documentation?
No, your PR is great, I just want to split it in two: one with the changes to the readme, and another one with all the logic
I can. What's the benefit of it though?
Seems like that in the case of throwing an error inside the function provided to the fromTry function, the type of the error will be not inferenced by TypeScript, so, this is the issue of the documentation.
I would like to fix it separately (I could do it by myself), but removing of the generic parameter it's another task that I would like to discuss before the merging (at least, it will be great to not remove the parameter, but provide the unknown as a default value for the type parameter)
Docs in another PR: https://github.com/JSMonk/sweet-monads/pull/66