effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: Evaluate `attest` for type level tests

Open effect-bot opened this issue 2 years ago • 1 comments

Summary

In the above conversation, the topic of overloading functions with refinements in effect-ts was discussed. The user expressed their frustration with having to use type assertions when working with functions that take predicates instead of refinements. They mentioned their intention to make pull requests to address this issue.

The conversation then shifted towards type-level testing in effect-ts. The user asked if there were established patterns for type-level testing and mentioned the possibility of using tsafe or integrating with vitest. It was suggested to check out the attest library, which allows making assertions at runtime. The user expressed interest in integrating attest into the effect-ts project and discussed the possibility of running it alongside other automated tests in the CI pipeline.

The conversation also touched upon the use of dtslint for type testing and the ability of attest to test against different TypeScript versions. It was mentioned that attest supports runtime assertions, which allows for more flexibility in testing.

Finally, the user decided to continue with their PR using dtslint tests but expressed their intention to create an issue to discuss integrating attest with the effect-ts project in the future.

Key takeaways:

  • Overloading functions with refinements can improve code readability and eliminate the need for type assertions.
  • attest is a powerful runtime assertion library that can be used for type-level testing in effect-ts.
  • Integrating attest into the CI pipeline and running it alongside other tests can provide comprehensive type testing coverage.
  • dtslint is currently used for type testing in effect-ts.
  • Discussions around integrating attest with effect-ts will be held in the repository's issue tracker and the repo-tooling channel.

Discord thread

https://discord.com/channels/795981131316985866/1173992361316057179

effect-bot avatar Nov 14 '23 19:11 effect-bot

The discord thread above is the original thread. I've opened a new discord thread under repo-tooling: https://discord.com/channels/795981131316985866/1174067939843002458

Could somebody with the right priveleges please change the title of this issue to something more appropriate (this issue was created by effect-bot)

wmaurer avatar Nov 14 '23 19:11 wmaurer