Can I use import in SS 2.1?
# suitescript
n
Can I use import in SS 2.1?
s
With TypeScript, yes.
n
No, with JS
s
no. NS is still AMD as far as I know. If you use TS, you can use modern
import
syntax and TS quietly emits AMD compatible code behind the scenes. Personally, I use UMD for NS code written in TS and works great - as well as supporting executing unit testing with node without recompilation.
👍 1