We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
consTrue
constFalse
boolean
constTrue and constFalse are functions that both lazily return a boolean instead of true and false types, respectively.
constTrue
true
false
I expect constTrue() to return true of type true and constFalse() to return false of type false.
constTrue()
constFalse()
import { constFalse, constTrue } from "fp-ts/function"; const myFn = (): true => constTrue(); // TS(2322): Type 'boolean' is not assignable to type 'true'.
Which versions of fp-ts are affected by this issue? Did this work in previous versions of fp-ts?
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
🐛 Bug report
Current Behavior
constTrue
andconstFalse
are functions that both lazily return aboolean
instead oftrue
andfalse
types, respectively.Expected behavior
I expect
constTrue()
to returntrue
of typetrue
andconstFalse()
to returnfalse
of typefalse
.Reproducible example
Suggested solution(s)
Additional context
Your environment
Which versions of fp-ts are affected by this issue? Did this work in previous versions of fp-ts?
The text was updated successfully, but these errors were encountered: