Learn how to install the Types for your Project
Thin Backend generates TypeScript Type Definitions based on your database schema. This catches most runtime errors ahead of time, while providing really nice autocompletion.
The custom Types can be installed into a project by installing a custom npm package. This npm package is specifically generated for your project and tagged with a secret url, so only you can access it.
Open the Schema Designer. Click the
Type Definitions tab. Now you see a
npm install .. command:
Run this command locally in your project directory. After that the types will be automatically available in your project.
When you make changes to the database schema, a new type definition package will be generated. To use the latest types, open the
Type Definitions tab again and install the latest package listed there.
The package url used in the
npm install .. is different each time the schema is changed.
If you need any help or input, feel free to ask in the Thin Community Forum.