On the possibility of introducing TypeScript as a scripting language

I am scripting the custom functions we need using JavaScript through the scripting features supported by FMOD Studio.

However, as the complexity of the code logic increases, trying to differentiate the types of various variables in the code is becoming progressively more difficult.

It occurred to me that many companies have introduced TypeScript as a scripting language instead of JavaScript because it has better features for type checking, context speculation, and makes it easier to write feature-rich scripts. And both can also solve compatibility issues more easily.

So, will FMOD Studio consider introducing TypeScript as a scripting language in the future?

Also, the JavaScript environment supported in FMOD Studio seems to be ES5, which makes some of the newer features unavailable. Will an upgrade be possible in the future?

There is also a small problem if the js file name has “.” , will not be recognized normally.

For example, if my file name is MyScriptV1.2.3.js, FMOD Studio will not read the script.

If you change the name to: MyScriptV1_2_3.js, it can be read normally.

We currently don’t have any plans for TypeScript - you’re welcome to use the TypeScript preprocessor on your own code though, as Studio can run what it outputs.

The recently released 2.03 version of Studio supports the use of ECMAScript 2023.

Thanks for pointing that out, I’ve been able to reproduce it on my end, and I’ve noted it internally.

1 Like

But if I want to get code completion for various types, functions and hints in TS, it may be that I need an official API interface file like xxx.d.ts to realize it. So is it possible to provide such files in the future?

It would be possible, and I’ve added it to our internal feature tracker, but it’s unlikely to be actioned without more interest from users.

1 Like

Thanks for the endorsement, I’m looking forward to this feature finally being implemented!