Hi. Im studying SuiteScript. Im thinking to use Ty...
# general
a
Hi. Im studying SuiteScript. Im thinking to use TypeScript for the script creation instead of the vanilla javascript. Is that ok? Will there be a problem if I use TypeSCript instead?
n
I don't personally use Typescript but I believe @stalbert is a big advocate and will likely advise.
👍 1
a
Is it ok to use it?
s
There is no problem using TypeScript for NetSuite scripting, and many benefits.
👍 1
n
@stalbert do you have an sdf starter or project for using typescript in suitescript
s
yes, but it will take me time to provide a ZIP. The readme at @hitc/netsuite-types is also reasonable.
👍 1
n
I've done a little testing with typescript for suitescripts previously, ended up hitting friction with sourcemaps, including modules
having multiple named defines in the transpiled source seemed to be problematic
NetSuite doesn't handle sourcemaps really so stacktraces were hard to follow
s
If you're doing SS2.1 the JS looks very similar to the TS source - I don't use sourcemaps at all.
a
do you have any reference material to read on using it?
s
Here is a project skeleton. Unzip it, cd to the SS2 folder and run
npm install
then you should have a compilable solution
❤️ 1