kepler
kepler copied to clipboard
Propigate class constraints for Query handlers from Application
General case of #256
It would be better to enforce these constraints when the Module or Query handler is built, rather than just when makeApp
is called.
Based on my very light reading, it looks like at a minimum:
- A
StoreLeaf
query of typeMap
requiresQueryData
on theKey
type. - A general
Leaf
query requiresHasCodec
on the type being returned. (perhaps this could be enforced through a constraint in the QueryResult type?)
Yes this makes sense, I can look into this. I’m out of the office/ open source works for the next week, but will accept any pr that fixes it done before then
I was thinking about this, I think we can make a smart constructor for constructing a module and not expose the constructor directly. I will try to make a PR