Open astroash opened 5 years ago
Is this just request types or also response types?
Also, I like namespaces to keep things clean, but worth investigating whether they'll work on the dashboard because of this (check the caveat section)
Is this just request types or also response types?
Yeah should be both. I guess it will look more like:
// types for /community-business
namespace CommunityBusinesses = {
export namespace Visitors {
getRequest: type ...
getResponse: type ...
}
}
// use case
...
handler: async (request: CommunityBusinesses.Visitors.getRequest, h: Hapi.ResponseToolkit) => {
...
I like namespaces to keep things clean, but worth investigating whether they'll work on the dashboard
I'll double check. I believe that we don't need namespaces to actually be compiled, we can confirm these type constraints with a linter...
OK sounds good.
Proposal:
part of #12