RE: Using Typescript with SDF Deploy

Hi,

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

cbhumireddy Rookie Asked on November 12, 2019 in SuiteScript.
Add Comment
2 Answers

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.

Advanced 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

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.