You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{GetStaticResource}from"wasp/server/api";exportconstgetStaticResource: GetStaticResource=async(req,res,context)=>{returnres.json({message: "Hello from getStaticResource"});};
When I type res. I don't get any autocomplete. When I clicked through the types of Api I found this:
It complains we are missing @types/express.
And when I changed express to express-serve-static-core, the types auto-complete worked.
Proposed implementation
We should either swap out express for express-serve-static-core when we are after Express types or investigate if there is a better way (a newer way) to get the Express types since Express development started again. (Maybe the solution will be upgrading to Express v5 in the end?)
The text was updated successfully, but these errors were encountered:
I was building a custom API endpoint:
When I type
res.
I don't get any autocomplete. When I clicked through the types ofApi
I found this:It complains we are missing
@types/express
.And when I changed
express
toexpress-serve-static-core
, the types auto-complete worked.Proposed implementation
We should either swap out
express
forexpress-serve-static-core
when we are after Express types or investigate if there is a better way (a newer way) to get the Express types since Express development started again. (Maybe the solution will be upgrading to Express v5 in the end?)The text was updated successfully, but these errors were encountered: