Petri Lehtinen
Petri Lehtinen
`optics-ts` is still pretty new, but the type construction it uses seems to allow typing many optics that other TypeScript libraries cannot type properly. Don't hesitate to create issues or...
Unfortunately, traversals don’t allow that kind of stuff in general. Introducing something like `RemovableTraversal` could make sense, though, especially if it would allow returning a special “remove me” value from...
Also, typescript seems to have really hard time to type check certain things with this pr’s modifications, so I’m not sure if this can be merged at all.
One more thing: If you’re using optics from a JavaScript project (instead of TypeScript), I highly recommend https://github.com/calmm-js/partial.lenses. It’s much more feature complete than optics-ts and supports stuff you mentioned....
Interesting idea! Currently, the optics-ts internals don't model traversals with applicatives like that, so not sure how to actually implement this. Also, typing the applicative construct in TypeScript might prove...
Nice! I can add the record traversals. I don’t think there’s a way to amend the interface with new optics. However, I’m working on a new API in which optics...
Yeah, unfortunately there's no support for `null` yet. At some point I was pondering whether `null` should be treated the same way as `undefined`, so that e.g. `optional()` and `valueOr()`...
We currently transform uncaught JavaScript exceptions to a 500 without any error message. Would it be better to crash the server and print the traceback to console? Would this direct...
It's not possible to ensure that JavaScript exceptions have been caught on type level. There's a plan to do something about this in `Aff`: https://github.com/slamdata/purescript-aff/issues/137
... and because it's not possible on type level, I don't really see a way to enforce this other than crashing the server. It seems to me that if the...