Question About Effect Generator "Adapter" and Possible TypeScript Issue
Effect generator "adapter" and odd type issue.
I was previous evaluating using Effect for use in some upcoming projects at my org. I had to shelve it for a couple months but recently dusted it off. Re-reading the docs it seems that the generator "adapter" is no longer referred to (the suggested convention was to use an underscore
So my first questions are: am I remembering this correctly and is it no longer required?
Secondly, while trying to remove my use of the underscore to see if this all was the case, I ran across something that may be purely a TypeScript issue but I was wondering if anyone else had encountered it and has a solution. What happens is that when assigning a
Thanks for your time!
I was previous evaluating using Effect for use in some upcoming projects at my org. I had to shelve it for a couple months but recently dusted it off. Re-reading the docs it seems that the generator "adapter" is no longer referred to (the suggested convention was to use an underscore
_, e.g. Effect.gen(function* (_) { ... })). In the docs, I recall it being used to wrap things that returned the Effect.Effect type.So my first questions are: am I remembering this correctly and is it no longer required?
Secondly, while trying to remove my use of the underscore to see if this all was the case, I ran across something that may be purely a TypeScript issue but I was wondering if anyone else had encountered it and has a solution. What happens is that when assigning a
yielded Effect.tryPromise to a const, the compiler/language server emits TS7022. But simply adding the argument back to the generator function clears the error even though it is unused. Here's a minimal reproduction:Thanks for your time!
