@D17339 IMO: type checking is very helpful - so as I change my code I know if I’m breaking something and having interfaces saves me time from look into documentation, since you get code complete.
d
D17339
07/25/2019, 5:52 AM
i use atom IDE , can i know the steps how to use this, and i am new to typescript @Luiz Anjos@michoel
l
Luiz Anjos
07/25/2019, 5:55 AM
I don’t use atom, I know that VS code does the autocomplete out of the box. So you probably want to look for an Atom plugin to do it.
Type script itself you install as a node package, that git repo https://github.com/headintheclouddev/typings-suitescript-2.0 explain a bit how to configure your tsconfig.json (that will create once you install typescript)
d
D17339
07/25/2019, 6:58 AM
1. Should we convert it back to javascript file once our code is ready in typescript?
2. Any advantage for typescript over javascript?
3. How other developers will work on my TypesScript SuiteScript 2.0 in Netsuite who doesn't know typescript, this will be a problem.
4. Any good tutorial suggestions for learning typescript
@Luiz Anjos@michoel
l
Luiz Anjos
07/25/2019, 7:03 AM
1. The typescript compiler does generate a standard javascript output for you.
2. I think you should google more about what typescript and type checking is. Typescript is JS with a type checking - so that’s the advantage.
3. ideally they should learn TS, but its possible to write plain JS as well, although having a mixed codebase defeats the purpose.
4. https://www.typescriptlang.org/
s
stalbert
07/25/2019, 3:03 PM
Another benefit of TS over JS is it means I have fewer deployments (script file uploads) to NetSuite because TS catches many errors that I otherwise wouldn't notice unless I deployed and tested manually (i.e. JS may not notice the error until runtime, or even worse, not at all).