Skip to main content

Editor setup

QuestScript writes three helper files to config/questscript/ on startup:

  • types.d.ts — JavaScript/TypeScript declarations;
  • types.pyi — Python type stubs;
  • jsconfig.json — JavaScript project configuration.

Open config/questscript/ as the editor workspace. Scripts under scripts/ can then use the adjacent declarations. Enable checking for an individual JavaScript file with:

// @ts-check

types.d.ts and types.pyi are generated language projections of one shared API: JavaScript uses only camelCase, while Python uses only snake_case. World and dimensions, blocks and volumes, players, inventory and Inventory Leases, Trigger Volumes, events, and scheduling retain the same semantics. Both declarations are built from one semantic graph and ship together.

Generated HTML versions of both contracts are available in the API reference: JSDoc produces the JavaScript section and types.pyi docstrings produce the Python section.