# Generating Typescript Models

**URL:** <https://community.forestadmin.com/t/generating-typescript-models/7468>\
**Category:** Help me!\
**Created:** [September 24, 2024, 11:43am UTC](https://community.forestadmin.com/t/generating-typescript-models/7468 "2024-09-24T11:43:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marksrr](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@marksrr](https://community.forestadmin.com/u/marksrr)\
**Post date:** [September 24, 2024, 11:43am UTC](https://community.forestadmin.com/t/generating-typescript-models/7468/1 "2024-09-24T11:43:37Z")

</div>

Dear Forest-Team,

we are in the process of migrating our agent from sequelize to the agent. The documentation of the agent talks about [the typing file generated by forest admin](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/install/autocompletion-and-typings#using-the-typing-file-in-a-typescript-context), but we don’t have that in our project. The documentation das not say how to trigger any logic.

We are on forest-express-sequelize 9 and @forestadmin/agent 1.44.

Is there any way to autogenerate type definitions for our models like `forest schema:update` created our JS files?

Thank you!  
Markus

---

<div class="post-metadata">

**Author:** ![anthony.guimard](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/anthony.guimard/32/6983_2.png) [@anthony.guimard](https://community.forestadmin.com/u/anthony.guimard)\
**Post date:** [September 24, 2024, 12:12pm UTC](https://community.forestadmin.com/t/generating-typescript-models/7468/2 "2024-09-24T12:12:57Z")

</div>

Hello @marksrr !

When using [@forestadmin/agent](https://github.com/ForestAdmin/agent-nodejs), you have to specify where to generate the type definitions for your models by using the typingsPath option when creating your agent with createAgent. Here’s an example:

```javascript
createAgent({
  // ...others setup options
  typingsPath: './typings.ts',
  typingsMaxDepth: 5,
})

```

In this example, when you start your application, after the initial analysis of your database schemas by the agent, the type definitions will be generated in the `./typings.ts` file of your project.

For more details on the available options, feel free to check the [official documentation](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/install/autocompletion-and-typings#generate-a-typing-file).

---

<div class="post-metadata">

**Author:** ![marksrr](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@marksrr](https://community.forestadmin.com/u/marksrr)\
**Post date:** [September 24, 2024, 12:29pm UTC](https://community.forestadmin.com/t/generating-typescript-models/7468/3 "2024-09-24T12:29:08Z")

</div>

Ah ok I think I misunderstood that property, thank you!
