Skip to main content

TypeScript Editor

The drone the coding-editor tutorials build, finished in white with orange accents: a carbon frame with hexagon vents, four arms with motors and two-blade propellers, a honeycombed canopy with the bitbybit logo, sprung legs and a camera on its gimbal

The TypeScript editor gives you the whole Bitbybit API in code. It is Monaco, the editor of VS Code, set up for the API: it suggests what fits as you type, explains every function on hover, and marks a mistake before you run. If you already write code, it is the fastest and least constrained way to use the platform: loops, functions, classes and your own abstractions all work as they do anywhere.

TypeScript is JavaScript with types. The types are what let the editor know the API so well, and they disappear when the script runs: the same code runs in a browser, in your own app through the npm packages, or on Node.

What you can do​

  • Call the API through the bitbybit constant, with option objects from the Bit namespace.
  • Split a script into files and folders that import from one another, with main.ts as the file the run starts from.
  • Let the editor help: suggestions at every dot, documentation on hover, and errors marked before you run.
  • Let an agent build with you: an AI agent in your browser can write the files, run the script and read its errors.

New to programming? Rete and Blockly call the same functions without typing; what you learn there carries over.

Where to start​

  1. The tour names every part of the window.
  2. Hello World writes a first script step by step, with a picture after every step.
  3. A parametric cube sizes a solid from one number.
  4. Build a drone, the one above, over seven chapters: a script of nineteen files, a function for every part and a folder for the arm.
  5. The showcases are larger scripts to open, run and take apart.

A script runs when you press Run The Code. Running code explains the 3D view and the console, which every editor shares, and the shortcuts list the keys. For a large project, the npm packages let you work in your own editor with version control.

Verified against the product in October 2026