Notable Supported Features

Eryn Lynn edited this page Dec 1, 2018 · 10 revisions

Here are some of the more notable and useful features of roblox-ts that are supported right now:

  • The entire Roblox API is available and has type definitions, with automated generation and releases with Roblox updates.
  • Promises with new Promise (uses roblox-lua-promise internally)
  • async/await with promises
  • Map (Also WeakMap)
  • Set (Also WeakSet)
  • Array methods (.map, .filter, etc.)
  • Object.assign, Object.entries, Object.keys, Object.values
  • String methods
  • Rest/spread syntax in objects and arrays
  • Try/catch and object throws
  • Bitwise operations (except ~ and >>>)
  • TSX for Roact with the rbx-roact package
  • Files named index.ts will be transpiled as init.lua in order to align with conventional syncing plugin details, allowing you to have scripts inside of other scripts in the game tree.
  • All functions are called with a . as there is no : method syntax in TypeScript. Emitted Lua will call functions with : or . depending on its type definition (as members of objects, arrow functions are called with ., normal functions with :).
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.