Closed skovhus closed 3 years ago
@corradio was it ever a design concern for modelCanRun
to not use external data like getEntryByKey
that I use here?
@corradio was it ever a design concern for
modelCanRun
to not use external data likegetEntryByKey
that I use here?
It wasn't a concern that I remember of. In general I tried to have pretty general modelCanRun
in order to have better error messages ("No model found" vs "Incorrect line identifier for purchase")
https://github.com/tmrowco/bloom/issues/404
Adjust
modelCanRun
for ingredients model to not be as greedy.To me this shows that we need a better way of annotating the supported types and how to not duplicate
modelCanRun
and the validation done in the model.I suggest we investigate https://github.com/colinhacks/zod or https://github.com/pelotom/runtypes