🐛 Bug report
Current Behavior
constTrue and constFalse are functions that both lazily return a boolean instead of true and false types, respectively.
Expected behavior
I expect constTrue() to return true of type true and constFalse() to return false of type false.
Reproducible example
import { constFalse, constTrue } from "fp-ts/function";
const myFn = (): true => constTrue(); // TS(2322): Type 'boolean' is not assignable to type 'true'.
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?
| Software |
Version(s) |
| fp-ts |
master |
| TypeScript |
>= 4 |
🐛 Bug report
Current Behavior
constTrueandconstFalseare functions that both lazily return abooleaninstead oftrueandfalsetypes, respectively.Expected behavior
I expect
constTrue()to returntrueof typetrueandconstFalse()to returnfalseof 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?