anyone transpile with Typescript? tried using <htt...
# suitescript
k
anyone transpile with Typescript? tried using https://www.npmjs.com/package/@hitc/netsuite-types but am still getting hit with
Cannot find module 'N/types'
a
Just out of curiosity Kris, what does this allow in Typescript? I am not too familiar with Angular JS but considering a project to develop a custom Production Planning tool for our Production facility. Does this package allow developing Netsuite scripts in Typescript or in Angular? Why would a developer consider using this?
m
This package basically defines the SS2.0 API in TypeScript so you get compile time warnings for API mistakes and amazing Intellisense (autocomplete). The advantages in general to using TypeScript is static typing (catch errors at compile time instead of run time) and in NetSuite you get the benefit of being able to use ES6+ syntax
message has been deleted
👍 1
k
cool demo
wish atom would show the parameters inside e.g.,
ui.createForm
, maybe I should switch over to Visual Studio...
c
by Visual Studio you should mean WebStorm 😄
m
Above screencast is Webstorm but VSCode is pretty solid and just getting better every release
c
It is pretty nice last time I checked it out
I originally liked WebStorm bc I could have other language framework/library syntax and run nodejs right in the IDE but its changing pretty fast
k
hmm, ok, yeah even in VSCode I don't get the option parameter hinting
it just shows e.g.,
Copy code
createForm(options: ui.CreateAssistantOptions): ui.Form

Creates a form object
where obviously it be nice if it showed me that
title
and
hideNavBar
are what it's expecting - did WebStorm give you that out of the gate or did you have to add something?
m
Pretty sure it's just out of the box like that
k
@michoel hmm I just tried loading up webstorm and it has the same issue - you sure there wasn't some sort of config you enabled to display option parameters?
m
🤷‍♂️
I'll have a look through my settings in a bit and see if I changed anything
k
oh, are you hitting ctrl+space to get that list? i assumed it was popping up automatically in your gif - now I can see that property list in atom
a
wow! Thank you guys! I need to move over to webstorm and use this! This is so much better than me opening up 25 browser windows to reference the API all the time. 🙈
m
Oh yeah I was pressing, sorry I didn't understand what you meant.
a
Hi guys, i am just starting to look into Webstorm (evaluation for now). qq: I am not able to find what I need to do to import my current scripts from NS account into Webstorm project... what am i missing?