# On the possibility of introducing TypeScript as a scripting language

**URL:** <https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539>\
**Category:** FMOD Studio\
**Created:** [April 25, 2024, 6:49am UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539 "2024-04-25T06:49:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [April 25, 2024, 6:49am UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/1 "2024-04-25T06:49:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [April 25, 2024, 6:58am UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/2 "2024-04-25T06:58:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [April 29, 2024, 6:38am UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/3 "2024-04-29T06:38:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [May 2, 2024, 11:51pm UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/4 "2024-05-02T23:51:10Z")

</div>

> [@MisakaCirno](#):
>
> So, will FMOD Studio consider introducing TypeScript as a scripting language in the future?

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.

> [@MisakaCirno](#):
>
> 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?

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

> [@MisakaCirno](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [May 3, 2024, 2:42pm UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/5 "2024-05-03T14:42:54Z")

</div>

> [@Leah\_FMOD](#):
>
> 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.

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?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [May 8, 2024, 12:54am UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/6 "2024-05-08T00:54:16Z")

</div>

> [@MisakaCirno](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)\
**Post date:** [May 8, 2024, 2:53am UTC](https://qa.fmod.com/t/on-the-possibility-of-introducing-typescript-as-a-scripting-language/21539/7 "2024-05-08T02:53:19Z")

</div>

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