Get started
- Install typesql-cli as a dev dependency
- Add the typesql.json configuration file in project root folder. You can generate an template with cli command
npx typesql init
.
- Write your queries in the folder specified in the configuration file. You can also use the cli to scaffold the queries.
- Then run
typesql compile --watch
to start typesql in watch mode. After that you will have one Typescript file for each query file.
- Now you can import and use the generated code.