[HN Gopher] ts-blank-space is a fast type-stripping compiler
___________________________________________________________________
ts-blank-space is a fast type-stripping compiler
Author : joatmon-snoo
Score : 5 points
Date : 2024-09-20 12:18 UTC (5 days ago)
(HTM) web link (bloomberg.github.io)
(TXT) w3m dump (bloomberg.github.io)
| thecodrr wrote:
| You'd already be using source maps in any real-world scenario so
| I am not sure what's the value proposition here outside of "just
| for fun, I guess".
|
| The tsc transpilation to lower ES versions is actually really
| useful when using not-so-recent Node versions. Not to mention
| this severely restricts TypeScript syntax to "just types" which
| isn't too bad but it means you now have to worry about yet
| another thing.
|
| Then there's the ESM & CJS mess. You almost always want to export
| in both formats which will change a lot of the syntax, so this
| quickly falls apart for anything serious.
|
| Just use esbuild if you want speed.
| rendall wrote:
| All of your objections are addressed in the article.
| rendall wrote:
| This is such a simple idea that it seems like it shouldn't work.
| Pretty nifty.
| peterldowns wrote:
| I am shocked to not see a reference to Taylor Swift's hit song
| Blank Space anywhere in the article!
| textadventure wrote:
| Same thought, surely it can't be a coincidence, maybe they
| thought it was so on the nose that it would be best to not draw
| attention to it.
| wk_end wrote:
| > Skipping this work is what makes this a swift approach.
|
| Hmm...
| umvi wrote:
| > Today, it appears to be the fastest emitter written in
| JavaScript
|
| JavaScript is really slow though compared to golang. For that
| reason I prefer esbuild for type-stripping.
___________________________________________________________________
(page generated 2024-09-25 23:00 UTC)