You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I have use the library to work on typescript files and everything works great but recently I had to go back to a few files that are written on JS and I have been trying to get autocompletion to work.
if you add the paths section as shown in the README on here, then you don't have to have the relative import paths
can then just have @param {import('N/search')} search
but agreed the import syntax (https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types) is the general approach to get working
here is my jsconfig.json:
(mainly the checkJs, baseUrl, & paths part as important)
which parts do you consider "hacky" or are unsatisfied with approach to getting the SuiteScript modules autocompletion to work in pure JS projects?
(I just use non-TS in NetSuite development as well, so I am interested as well if there is better setup options too)
Hello! I have use the library to work on typescript files and everything works great but recently I had to go back to a few files that are written on JS and I have been trying to get autocompletion to work.
For now I was able to get it working with a solution based on this link:
https://blog.8bitzen.com/blog/23-09-2022-using-jsconfig.json
It consists of adding JSDocs pointing to the d.ts files like so:
Which seems a little bit hacky but allows autocompletion to work
Is there another approach to make this work?
The text was updated successfully, but these errors were encountered: