Pipe required before narrow
Results in error:
However, adding
pipe
before calling narrow
works:
Is this intentional?4 Replies
No those branded types should never be inferred out like that. I'll fix it, thanks!
Also seems like I can't use two
narrow
in a row, I need to do narrow -> pipe -> narrow
, with the pipe doing nothing more than return the value untouchedI'll see if I can get all these bug fixes merged today!
GitHub
Cannot use narrow before pipe · Issue #969 · arktypeio/arktype
Report a bug 🔎 Search Terms narrow pipe 🧩 Context ArkType version: 2.0.0-dev.13 TypeScript version (5.1+): 5.3.3 Other context you think may be relevant (JS flavor, OS, etc.): 🧑💻 Repro const myFun...