Query Typescript
I have the following code in my main.wasp:
And query.ts:
Do Wasp have a type to have typescript types on the args and context ?
4 Replies
yes! check out this example:
so args you can specify yourself as you wish (either create a custom type or use one from the entity), and context is automatically inferred from the query definition in .wasp config
TypeScript Support | Wasp
TypeScript is a programming language that brings static type analysis to JavaScript. It is a superset of JavaScript (i.e., all valid JavaScript programs are valid TypeScript programs) and compiles to JavaScript before running. TypeScript's type system detects common errors at build time (reducing the chance of runtime errors in production) and e...
Ah super thank you!