- Compare
pages.houses.vuewithpages/cars.vue. The types in the houses page are muddled.
- Install the dependencies.
- Add
DATABASE_URLto .env file, push schema and rundb/seed.tsif needed.
- The undefined error did not show up in the original code but did in this reproduction, so it wasn't handled. However, the issue where
totalappeared asnumberin the handler and asanyis the same. 
- The issue with
Promise.alldoesn't occur in this reproduction but does in my app. One thing not reproduced was my use ofAliasedTablesfrom Drizzle.
How can the result types (e.g., total or a key in the result) be inferred correctly in the API routes and returned, but inferred as any in the InternalApi, resulting in muddled types?