Add JavaScript to Interface Asset

Hello,

I have some JS code that wish to re-use in my TypeScript interface asset. Does anyone know of a way I can add it into the project, reference call it from from my Action

Thanks,

Hi Liam @lalford and welcome to the Intuiface community.

TypeScript and JavaScript are very similar and if you have some JavaScript code you want to use within an Action of your TypeScript interface asset, you can just copy&paste your JS code in that action, then resolve the few errors VS Code should give point out. For examples, all your variables will need to be typed. If don’t have access to the correct type for a variable, just declare it with the type any.

If you encounter any issues while trying to do so, please contact us through our Support Platform so we can ask you to privately share your code with us.

Best,

Seb