Skip to main content
Node.js only - This page covers TypeScript autocompletion setup for the Node.js agent. For information about Forest data types, see Data Types.
The Forest Node.js back-end, built entirely in TypeScript, provides comprehensive autocompletion capabilities for collection names, field names, and handler parameters.

Generating a Typing File

The back-end can generate a typing file based on your data models. This file is auto-generated and should not be manually edited.

Configuration Options

Two configuration options control typing file generation:
  • typingsPath: Specifies the location where the typing file will be created
  • typingsMaxDepth: Controls the maximum introspection depth for relationships

TypeScript Usage

In TypeScript projects, import and template the generated schema:
The customizeCollection method and handler parameters receive strong typing through the Schema template.

JavaScript Usage

JavaScript developers can leverage JSDoc syntax to maintain autocomplete capabilities:

Main Back-end File

Customization Files

In separate customization files, JSDoc type annotations preserve autocompletion: