Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to use transpiled JS in script-include in servicenow.

har_shar111
Tera Contributor

Hi

I am working on a project where I have to use Typescript files in Servicenow and call it from widget client/server script. As Servicenow does not support Typescript, I have transpiled the typescript into javascript(es5) and using this transpiled JS in script-include. But I am getting parsing errors in script include for "Import" and "Export" keywords.

har_shar111_0-1710325846630.png

I have googled this and found that the error can be resolved by updating "parserOptions" ESLint config file. (https://github.com/AtomLinter/linter-eslint/issues/462)

But I am unaware how to update ESLint config file in servicenow script include. Is there any workaround for this?

 

Thanks in advance.

0 REPLIES 0