4 ms·
TS is probably my favorite language out there, so yes, I definitely did :) But just for "one-off"-scripts, JS usually does the job pretty well. For bigger scri
by Shacklz 5y ago
TS is probably my favorite language out there, so yes, I definitely did :)
But just for "one-off"-scripts, JS usually does the job pretty well. For bigger scripts or scripts where I want to reuse/share parts, typescript is an option - but it comes with a few hurdles: Most of the scripts I'm talking about work with zero npm-dependencies, while typescript adds at least one.
Furthermore, I either have to take care of compiling it, or use ts-node - one more dependency; and in both cases, I can't avoid the usual es6 vs. commonJS shenanigans.
It's a bit of overhead to get going; always worth it if I spend more than a few hours on a script, but I can do without if it's just a few lines that I will hardly ever see again.
- dmux 5y agoI think Deno may be a good choice in this use case: single binary that has a good standard-lib makes it seem like a good candidate for simple shell and pipeline scripting.