Just out of curiosity, WebStorm marks functions li...
# suitescript
m
Just out of curiosity, WebStorm marks functions like these as
Unresolved function
and show a warning. Is there a way to get it to know the function? or I just have to disable it?
d
use https://github.com/headintheclouddev/typings-suitescript-2.0 to provide intellisense instead (can be used with pure JS projects as well)
m
but this will work with TS only, right?
d
no, you can set this up for non-TS projects as well I use vscode, but I think I had messed around briefly with it in Webstorm in the past and seemed to work ok there too
m
hmm, thanks, will try it.
d
I believe the main thing was just needed to include a
jsconfig.json
with "checkJs" as true (https://code.visualstudio.com/docs/languages/jsconfig) setup similarly to their tsconfig they have in the repo docs
m
were just reading about it
trying it...
done 🙌
d
also had to make change in script headers like: to match style https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types
or can tag individual stuff with
@type
like
Copy code
/** @type {import('N/record').Record} */
const contract = ...