Skip to content

Code Auto-Completion

Code auto-completion helps developers work faster and more comfortably with code, offering possible code completion options, variable names, functions, and other hints.

Below are the steps to configure code auto-completion for MotorXP-AFM Scripting API.

Configuration

  1. Download the file types_MotorXP-AFM.d.ts and save it in your scripts folder. The extension .d.ts is a TypeScript Declaration File, which contains only type definitions and interfaces, and does not compile to JS. It helps the IDE understand the structure of the API.

  2. At the beginning of each script add a special comment directive: /// <reference path="./pathToFile/types_MotorXP-AFM.d.ts" />.

  3. Utilize an IDE and editor that supports auto-completion (IntelliSense through .d.ts).

Supported IDEs

IDE / Editor Supports .d.ts Comment
Visual Studio Code Complete Best IntelliSense, auto-completion, JSDoc, and navigation support
WebStorm / IntelliJ IDEA ✅ Complete Support through TypeScript Server
Vim + TSServer ⚠️ Limited Requires plugins: vim-js-ts, coc.nvim and others.
Atom + ide-typescript ⚠️ Limited Requires package installations.
Sublime Text + TypeScript Plugin ⚠️ Limited Available through third-party plugins

Tip

When writing scripts, we recommend using a text editor Visual Studio Code.

Last update: 7 August 2025, 16:28