TypeScript Type Definitions

Learn how to install the Types for your Project

Introduction

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.

Installing the Types

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.

Updating the Types

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.

Community

If you need any help or input, feel free to ask in the Thin Community Forum.