Anyone have issues if their JavaScript has "use st...
# suitescript
e
Anyone have issues if their JavaScript has "use strict" in it?
n
I think it’s only supported in suitescript 2.1 So if you are running in 2.0 you may have issues.
πŸ‘ 1
e
Thanks Nathan
🫑 1
s
I think TS has emitted that by default for many years - I'm guessing even in SS 2.0 days?
n
Could be. I was going off this article over the differences between 2.0 and 2.1 https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_158755248128.html
ECMAScript 5 introduced strict mode. If a SuiteScript 2.0 script assigns a value to a variable without first declaring the variable using the var or const keyword, the script continues executing and no error is thrown. If a SuiteScript 2.1 script assigns a value to a variable without using the var , let, or const keyword, an error is thrown. For more information about strict mode, see Strict Mode.
d
@Shawn Talbert, I've had
noImplicitUseStrict = true
since the beginning. The latest typescript version deprecates this flag (which I can override, but considering learning the benefits and if NetSuite can even support this).
s
Well, if it makes you feel any better we don't have
noImplicitUseStrict
in our tsconfig πŸ™‚
and as you know, we've been doing TS [for suitescript] for many years now
πŸ‘Œ 1