© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Ryan Lee
⚠️ Disclaimer Warning fp-ts is now dead. Please use effect-ts instead. Update 2024: effect-ts is the recommended library for functional programming in TypeScript. Introduction Welcome to part 5 of this series on learning fp-ts t...
David Novák
So far I was able to get around this error by manually specifying error types:
sequenceS(E.either as E.as apply.Apply2C< 'Either', ValidateEmailError | ValidatePasswordError)({ email: validateEmail(email), password: validatePassword(password), })
But it still is not pretty.
The problem with this code:
sequenceS(E.either)({ email: validateEmail(email), password: validatePassword(password), })
Is if validateEmail and validatePassword has different left types it wont compile.
Is there a way around this?
David Novák
So far I was able to get around this error by manually specifying error types:
sequenceS(E.either as E.as apply.Apply2C< 'Either', ValidateEmailError | ValidatePasswordError)({ email: validateEmail(email), password: validatePassword(password), })
But it still is not pretty.