Using Typescript with SDF Deploy


Could someone please suggest how to use typescript for creating Suitescripts and deploy using SDF? Any references will be helpful.

Rookie Asked on November 12, 2019 in SuiteScript.
Add Comment
2 Answer(s)

I think you’ll have to create some sort of custom build/deploy process that compiles the TS and then deploys the compiled file.

A lot will depend on the IDE you’re using. For example, I’m currently exploring using WebStorm’s File Watchers to continually output transpiled JavaScript (ES.NEXT to ES5.1) and then use that when deploying via SDF.

Intermediate Answered on November 12, 2019.

Thanks @abbott, we are also using WebStorm. So if i understand correctly, we need to have seperate folder to hold .ts file and editor or some build process to transpile them to js which will be saved to cabinet path. is that correct? I just tried tsc -w with this approach, but when ts is compiled we are missing jsdoc comments (apiversion and script type) and also SDF deployment getting failed. Any inputs or sample here please?

How is the folder structure you are maintaining and tsconfig values configured like that.

on November 12, 2019.

With SS 2.1 you can transpile up to ES2018 now!

on November 12, 2019.
Add Comment

It looks like there might be a different process for TypeScript in WebStorm:


I’m not yet planning to use TS but am experimenting with the latest versions of JavaScript.


I’ve not got as far as a fully working solution once the compiled code is generated but am working on a couple of possibilities:

  • Having a separate folder tree for source code (not included in deploy.xml) that is then transpiled into the deployable section.
  • Having the transpiled files alongside the source files but excluding the source file types from deploy.xml.

In either case, I’m not yet certain what deploy.xml offers in terms of filtering, selection, exclusion, etc.



Intermediate Answered on November 12, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor