Skip to content
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

consistent-tap rule #19

Open
leighman opened this issue Nov 20, 2024 · 0 comments
Open

consistent-tap rule #19

leighman opened this issue Nov 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@leighman
Copy link

What is the problem this feature would solve?

Effect.tap allows more that Effect as the return type which is inconsistent with other tap functions.

What is the feature you are proposing to solve the problem?

This rule could either use type information to assert that tap always takes a function that returns an effect or potentially could enforce that uses of tap include an onlyEffect: true option in the arguments (wouldn't require type info?)

What alternatives have you considered?

Encountered this by accidentally providing a (args) => TaskEither<A, E> function to tap. Could just be more careful...

@leighman leighman added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant