Assignability of `Effect.Effect<never, never, number>` and `Effect.Effect<never, Error, never>` t...
Why are
This is probably more of a beginner Typescript question, but still would appreciate any guidance. In https://effect.website/docs/essentials/creating, there is the divide example.
It has an explicit return type of
Typescript seems to accept below without squiggles.
Wondering why these are assignable. Also, is it customary using Effect to provide explicit return types? What are the trade-offs letting Typescript infer the return type?
Effect.Effect<never, never, number> and Effect.Effect<never, Error, never> assignable to Effect.Effect<never, Error, number>?This is probably more of a beginner Typescript question, but still would appreciate any guidance. In https://effect.website/docs/essentials/creating, there is the divide example.
It has an explicit return type of
Effect.Effect<never, Error, number. If I remove the return type, Typescript seems to infer the return type as Effect.Effect<never, Error, never | Effect.Effect<never, never, numberTypescript seems to accept below without squiggles.
Wondering why these are assignable. Also, is it customary using Effect to provide explicit return types? What are the trade-offs letting Typescript infer the return type?
