From Discord: Evaluate `attest` for type level tests
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.
-
attestis a powerful runtime assertion library that can be used for type-level testing ineffect-ts. - Integrating
attestinto the CI pipeline and running it alongside other tests can provide comprehensive type testing coverage. -
dtslintis currently used for type testing ineffect-ts. - Discussions around integrating
attestwitheffect-tswill be held in the repository's issue tracker and therepo-toolingchannel.
Discord thread
https://discord.com/channels/795981131316985866/1173992361316057179
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)