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

Move the declaration of generics deeper into type signatures #373

Closed
wants to merge 2 commits into from

Conversation

codingedgar
Copy link
Contributor

@codingedgar codingedgar commented Sep 18, 2019

To close #372

@codingedgar codingedgar changed the title move bimap generics deep Move bimap generics deep Sep 18, 2019
@codecov

This comment has been minimized.

@codingedgar
Copy link
Contributor Author

@Avaq I started with bimap and fold and , i'll check others, if you have any other let me know.

@Avaq Avaq changed the title Move bimap generics deep Move the declaration of generics deeper into type signatures Sep 19, 2019
@Avaq
Copy link
Member

Avaq commented Sep 19, 2019

Some others where I think this may be beneficial are fork and forkCatch. But I think once #337 is resolved, many other functions can benefit:

  • after
  • rejectAfter
  • ap
  • both
  • hook
  • lastly
  • map
  • mapRej
  • parallel

@Avaq
Copy link
Member

Avaq commented Sep 22, 2019

Let's do the remainder of the functions listed above as far as we can without fixing #337, so we can get this merged. It seems #337 needs a bit more work.

Avaq added a commit that referenced this pull request Sep 25, 2019
- Revert #230 and reintroduce the usage of the 'never' type
- Relax the signature of chain and chainRej to allow TypeScript to
  derive types when merging a Future of a never with a Future of a
  real type. Closes #337 and closes #370.
- Move generic types closer to where they are used in the function
  signature. Closes #372 and closes #373 through supersession.

Co-authored-by: Edgar Rodriguez <edgarj.rodriguezg@gmail.com>
@Avaq Avaq closed this in #374 Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move TypeScript generics as deeply into function signatures as possible
2 participants