Hi all! Are any of you using Typescript, and if so...
# suitescript
k
Hi all! Are any of you using Typescript, and if so, what does your compile process look like? I'm starting from a completely clean environment and am looking into what others are doing instead of just spinning up my usual in case there's a better way out there.
a
I wanna say @darrenhillconsulting is a big TS user, so I'd listen to him... I know a lot of people use the hitc library to use TS in NS https://github.com/headintheclouddev/typings-suitescript-2.0
c
summon @Shawn Talbert
a
oh is it Shawn? was I mixing them up? 😬
d
My ears are on
k
You guys are the best 😄
I use the HITC library already for typings, just looking into what is the simplest most efficient way to build typescript to SuiteScript 2.1 these days
d
I'll keep things simple. create/dev in a
typescript
folder (to keep .ts seperate from you're build directory
src
. Then, I use 2 tsconfig files.
tsconfig.netsuite.json,tsconfig.json
k
Ok got that. What are you using to do the actual build? Just TSC?
d
When I'm ready to deploy .. I use
tsc -p tsconfig.netsuite.json
... but while developing locally, I use
tsc
k
That's rather painless. 🙂
Why the separate targets? Are you using an automated deployment pipeline?
d
separate targets?
Screenshot 2025-10-14 at 3.23.11 PM.png
👍 1
k
sorry misspoke, I meant separate configs
Ok, I'm up and running, thank you!
👍 1
d
Spread the ts word ....
2
s
We do it only a bit differently - keeping TS and JS files together and we deploy both to the NS file cabinet, single tsconfig.json
perhaps worth noting that we're generally doing Account Customization projects, not SuiteApps
k
Cool 🙂
I'm working on a GUI SDF installer suitelet
👍 1
so hopefully it'll support both account customizations and suiteapps eventually
g
Should ts just be the standard or is there some tipping point where ts is necessary?
k
In my experience it mostly helps with two things: 1. Forces me to keep my code sane/clean/readable 2. Works with the NetSuite typings module to provide additional autocomplete / insight in the IDE so you never have to wonder, "what were the arguments for that native SuiteScript function again?"
Oh and it lets me catch problems in my code in real time as I'm writing it
s
TS should be the standard because we are developing for a platform that runs remotely. Leveraging TS you can eliminate many coding errors before you even bother to upload the JS, resulting in a faster dev cycle.
💯 1
💪 1
(and more correct code 🙂 )
@Kristopher Wood did you see the bundlet.com posted in another channel (I forget which)?
k
Yeah, I saw it. Not sure if I'm reinventing the wheel or not haha
s
ah, well maybe joining forces with Simon would be worth exploring, unless you just want to do something on thy own
k
I've messaged him, we'll see where that goes 🙂
Ugh, deep down at the core of the SuiteCloud CLI for Node is the SuiteCloud SDK, running as a Java VM which won't exist in NetSuite, No straight port for me! >.<
🥲 1
🤔 1
s
NetSuite itself is Java, so I hope that wasn't a surprise for thee
k
Yeah not a surprise, but kind of a bummer for my current idea
Got it working by writing an MCP server on my web server, then an integration suitelet for a front end. The MCP server runs the actual commands and the Suitelet handles the NetSuite record keeping and UI.
s
Was your goal to have it be AI driven?
k
My goal was for AI to at least be able to read/explain things.
Doesn't work with chatgpt though because it refuses to send credentials 😆
I chose MCP though more because I thought it would be an interesting experiment to try building an integration that way.
s
As long as you're careful some rogue AI doesn't latch onto your MCP server and wreak havoc, or something like that! 🙂
k
haha yeah there will be credentials/encryption by the end 😄 just doing proof of concept at the moment