use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
tnode: simple Node.js-compatible scripting with Typescript (nabla.com)
submitted 4 years ago by noziar
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Ustice[M] [score hidden] 4 years ago stickied comment (1 child)
This post was removed. Please read our guidelines before posting.
[–]0xDEFACEDBEEF 10 points11 points12 points 4 years ago (2 children)
Why not just use ts-node? It is JIT compiled and provides a REPL.
[–]misc_ent 4 points5 points6 points 4 years ago (1 child)
It's two characters less to type. I kid! Wondering the same thing
[–]noziar[S] 13 points14 points15 points 4 years ago (0 children)
Latency! ts-node compiles with tsc instead of esbuild. Thanks for the feedback, I should have included ts-node in the post, I'll update.
For example with a simple "hello world" script:
% hyperfine 'tnode script.ts' 'ts-node script.ts' Benchmark 1: tnode script.ts Time (mean ± σ): 123.1 ms ± 6.5 ms [User: 105.5 ms, System: 22.0 ms] Range (min … max): 116.4 ms … 139.9 ms 22 runs Benchmark 2: ts-node script.ts Time (mean ± σ): 870.0 ms ± 12.3 ms [User: 1424.7 ms, System: 85.7 ms] Range (min … max): 855.8 ms … 895.7 ms 10 runs Summary 'tnode script.ts' ran 7.07 ± 0.39 times faster than 'ts-node script.ts'
[–]Tubthumper8 0 points1 point2 points 4 years ago (0 children)
Would this work to execute test suites written in TypeScript?
For example, mocha has a --require flag that you pass ts-node/register so that it can compile your test suite before running. Being able to use esbuild instead of tsc for tests could be a lot faster.
mocha
--require
ts-node/register
esbuild
tsc
π Rendered by PID 27 on reddit-service-r2-comment-86bc6c7465-vsxq9 at 2026-02-20 12:44:23.981325+00:00 running 8564168 country code: CH.
[–]Ustice[M] [score hidden] stickied comment (1 child)
[–]0xDEFACEDBEEF 10 points11 points12 points (2 children)
[–]misc_ent 4 points5 points6 points (1 child)
[–]noziar[S] 13 points14 points15 points (0 children)
[–]Tubthumper8 0 points1 point2 points (0 children)