# New nodejs agent - ts auto-completion

**URL:** <https://community.forestadmin.com/t/new-nodejs-agent-ts-auto-completion/7801>\
**Category:** Help me!\
**Created:** [January 31, 2025, 4:27pm UTC](https://community.forestadmin.com/t/new-nodejs-agent-ts-auto-completion/7801 "2025-01-31T16:27:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adel\_de\_Clevermate](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/adel_de_clevermate/32/4608_2.png) [@Adel\_de\_Clevermate](https://community.forestadmin.com/u/Adel_de_Clevermate)\
**Post date:** [January 31, 2025, 4:27pm UTC](https://community.forestadmin.com/t/new-nodejs-agent-ts-auto-completion/7801/1 "2025-01-31T16:27:07Z")

</div>

I am doing some restruction to the default project (TS), separating the collection customizations in different files in /forest directory - in order to not put all the code inside one file “index.ts”. The issue I got is the autocompletion is not working inside these new files, it works only inside the index.ts file.  
For example in index.ts :

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/0/02ed6cef1e07e79caadf6f7b1819246c50e82846.png)

In another file (forest/c\_besoin.ts):

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/da82a8db267cb1b361b1cdcb95dfffa9ad71a9ff.png)

Do you have any idea please?

- Project name: clevermate v2
- Environment name: …
- Agent technology: (nodejs,
- Agent (forest package) name & version: 1.58.3
- Database type: postgres

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [January 31, 2025, 4:36pm UTC](https://community.forestadmin.com/t/new-nodejs-agent-ts-auto-completion/7801/2 "2025-01-31T16:36:54Z")

</div>

Hello @Adel_de_Clevermate,

You can check our [example package](https://github.com/ForestAdmin/agent-nodejs/tree/main/packages/_example) inside the agent-nodejs repository to take inspiration from.  
It follows the architecture we envisioned our users would appreciate to use and work with.  
Typing and auto-completion works as expected if you follow a similar structure and declaration.

More precisely, you can check the [customization folder](https://github.com/ForestAdmin/agent-nodejs/tree/main/packages/_example/src/forest/customizations) (which would be `/forest` in your case) and the [agent.ts](https://github.com/ForestAdmin/agent-nodejs/blob/main/packages/_example/src/forest/agent.ts) (`index.ts` in your case) where the agent is initialized and where we import the customizations.

Best regards,
