Queries/Actions type

Can I get generated type for context of queries/actions? Docs examples for them are in JS which ruins the following use of them on client. Currently there is example with self-defined types (https://github.com/wasp-lang/wasp/blob/release/examples/todo-typescript/src/server/serverTypes.ts) but it looks like temporary solution
GitHub
wasp/serverTypes.ts at release · wasp-lang/wasp
The fastest way to develop full-stack web apps with React & Node.js. - wasp/serverTypes.ts at release · wasp-lang/wasp
4 Replies
Zeko369
Zeko36914mo ago
You actually can now (as of 0.10), when you define the action/query there is a Type generated for you and you can import it
import {MyQuery} from '@wasp/actions/types'
import {MyQuery} from '@wasp/actions/types'
fossfighter
fossfighter14mo ago
This is for client, I want generated context type for server based on wasp file
MEE6
MEE614mo ago
Wohooo @fossfighter, you just became a Waspeteer level 2!
fossfighter
fossfighter14mo ago
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...