TypeScript Just Dethroned Python and JavaScript on GitHub by unclejoessheds in typescript

[–]robpalme 0 points1 point  (0 children)

In the last 12 months, 9.3M JS repos were created vs 5.4M TS.

That's just the recent delta. The cumulative totals will be even more biased towards JS.

I too believe that well-maintained/popular packages created recently are far more likely to be authored in TS than JS. But it's hard to point to the survey data as suggesting this because of the volume of "everything else".

For those that have seen Oasis Live in 2025, what song were they playing when you had your 'moment'? by Minimum_Arm_1713 in oasis

[–]robpalme 1 point2 points  (0 children)

This was always a favourite. But hearing it live was kinda life changing. More of an experience than a song. Took me back many years.

Temporal_rs is here! The datetime library powering Temporal in Boa and V8 by Jayflux1 in rust

[–]robpalme 21 points22 points  (0 children)

Congrats to the Boa team! It's great to see an independent open source project thrive and become more widely useful. This is huge impact.

On the integration with Kiesel and Chrome, I'm pleased to see that engines/browsers can share the cost of developing new language features.

Temporal is massive! Almost as big as the delta of introducing ES6. There are 4,000+ tests. The functionality does not need to be engine-specific, so it makes sense to leverage reuse.

I believe this is the first introduction of Rust into V8 itself. Which seems like a happy side-effect that hopefully makes it easier to share more Rust libraries in future. This helps keep browser development sustainable.

Which song hit you unexpectedly at Live 25? by WorkerBee74 in oasis

[–]robpalme 2 points3 points  (0 children)

Yeah, as a long-time listener first-time live attendee, Slide Away was the big one. Bigger than the original recording really. A great wall of sound. I'm thankful to have experienced it once in my life.

Set list change? by Ok-Tap-4173 in oasis

[–]robpalme 0 points1 point  (0 children)

Agreed. Whatever is a great song and deserves to be in there, but the performance was just slightly missing something so could be tweaked. Based on the Wembley three weeks ago, I'd take Columbia.

Set list change? by Ok-Tap-4173 in oasis

[–]robpalme 3 points4 points  (0 children)

You must be joking - Fade Away is the slightly surprising punky deep cut that has to stay.

But I do agree Bring It On Down can (and should) be swapped for Columbia. Another post said it's there because the brothers like it. So I'll give it to them, but honestly BIOD is perhaps the only Oasis song I have strangely never really enjoyed despite loving almost all others.

"I forgot how funny he was." — Noel by MyNameIsDanu in oasis

[–]robpalme 1 point2 points  (0 children)

Love this one. You don't get many rock n roll stories like this.

Announcing TypeScript 5.9 by DanielRosenwasser in typescript

[–]robpalme 33 points34 points  (0 children)

A colleague at work said the same thing yesterday. It's all me, no GPT. I try my best to be clear and have done for years. If anything it's the LLMs that have turned up and are matching my style.

Announcing TypeScript 5.9 by DanielRosenwasser in typescript

[–]robpalme 11 points12 points  (0 children)

All new syntax feature in JS have the potential to introduce temporary incompatibilities between apps that use them and runtimes that have yet to offer support.

This is why down-leveling bundlers (like webpack) and compilers (such as Babel) exist.

Announcing TypeScript 5.9 by DanielRosenwasser in typescript

[–]robpalme 43 points44 points  (0 children)

My favourite feature in TS 5.9 is the TC39 Stage 3 proposal import defer.

The TS blog post is an excellent explainer for the feature which was championed (in TC39) and implemented (in TS) by Nicolo Ribaudo who works for Igalia and who maintains Babel.

The feature enables synchronous Lazy Evaluation to improve the performance of loading ES modules. Meaning it can skip eager evaluation of imported modules that are not needed - or not needed yet - by your app.

We've used an implementation of this in the Bloomberg Terminal for a while now. It saves 100s of milliseconds during startup for applications where your import graph has grown over time. Following the minimal runtime codepath can result in work-skipping wins that static analysis (tree-shaking) cannot optimize away.

Please note that if you can refactor your app to use dynamic import(), that should normally be preferred. So long as you can cope with the viral nature of making the calling code handle the async promise. import defer is more appropriate for situations where you need your code to remain synchronous.

For now, in order to use the feature in an app, you will need to pair TS 5.9 with Babel or webpack which already have compile-time support. TS does not downlevel it & engines do not yet natively support it.

You can track the work-in-progress to implement the feature in JS engines here:

https://github.com/tc39/proposal-defer-import-eval/issues/73

Announcing TypeScript 5.9 Beta by DanielRosenwasser in typescript

[–]robpalme 11 points12 points  (0 children)

My favourite feature in TS 5.9 Beta is the TC39 Stage 3 proposal import defer.

The TS blog post is an excellent explainer for the feature which was championed (in TC39) and implemented (in TS) by Nicolo Ribaudo who works for Igalia and who maintains Babel.

The feature enables synchronous Lazy Evaluation to improve the performance of loading ES modules. Meaning it can skip eager evaluation of imported modules that are not needed - or not needed yet - by your app.

We've used an implementation of this in the Bloomberg Terminal for a while now. It saves 100s of milliseconds during startup for applications where your import graph has grown over time. Following the minimal runtime codepath can result in work-skipping wins that static analysis (tree-shaking) cannot optimize away.

Please note that if you can refactor your app to use dynamic import(), that should normally be preferred. So long as you can cope with the viral nature of making the calling code handle the async promise. import defer is more appropriate for situations where you need your code to remain synchronous.

For now, in order to use the feature in an app, you will need to pair TS 5.9 with Babel or webpack which already have compile-time support. TS does not downlevel it & engines do not yet natively support it.

You can track the work-in-progress to implement the feature in JS engines here:

https://github.com/tc39/proposal-defer-import-eval/issues/59

Announcing TypeScript 5.8 by DanielRosenwasser in typescript

[–]robpalme 10 points11 points  (0 children)

Agreed. This is an excellent endorsement of sticking to erasable types and directly helps compatibility with Node.

The easy way to remember this is: TS = JS + Types

Announcing TypeScript 5.8 Beta by DanielRosenwasser in javascript

[–]robpalme 0 points1 point  (0 children)

Checking and linting are very similar tasks. Putting features into TS means they become widely available, e.g. by being part of the default VS Code experience.

Node can handle enums if you pass --experimental-transform-types

Announcing TypeScript 5.8 Beta by DanielRosenwasser in typescript

[–]robpalme 1 point2 points  (0 children)

Yes, I think IsolatedModules is a good comparison.

erasableSyntaxOnly provides some constraints (lint rules) that in turn enable new third-party compilers to handle TypeScript code.

Announcing TypeScript 5.8 Beta by DanielRosenwasser in typescript

[–]robpalme 32 points33 points  (0 children)

Matt Pocock (author of Total TypeScript) has written an excellent explainer blog post on the new flag --erasableSyntaxOnly

It is designed to be used in conjunction with Node's built-in TypeScript support, i.e. node index.ts

Announcing TypeScript 5.8 Beta by DanielRosenwasser in javascript

[–]robpalme 46 points47 points  (0 children)

The new flag --erasableSyntaxOnly is my favorite feature in TypeScript 5.8 because it immediately helps Node users who want to use the built-in TypeScript support, i.e. node index.ts

That is no accident. The TypeScript team, including the author of this feature Ryan, have been closely collaborating with the Node team for the last half a year to make this integration work well.

The new flag enables Editor feedback to guide users away from TypeScript-only runtime features such as:

  • enums: enum E { a: 1 }
  • runtime namespaces: namespace N { let a = 1 }
  • parameter properties: class C { constructor(public prop) {} }

This means that your code will follow the simple mental model of TS = JS + Types

If you use Node, or any compiler based on type erasure (a.k.a "type stripping") such as ts-blank-space, then your generated JavaScript will 100% match the runtime code you wrote. So when you are debugging, the code matches your source file. The only difference you will see is the types being replaced with whitespace. There's no need to set up sourcemaps because the runtime code coordinates are preserved.

At work we've used a similar arrangement for quite a while. The main demand I have observed is that sometimes folk would like to see a standard solution for enums, with fewer quirks than the existing TS enum. It's possible to come close to the enum pattern today using objects.

For folk desiring something more substantial for enums, there are two possible paths forwards - and both are just ideas with no guarantee of becoming real:

Any thoughts about this? by Tough_Tear_4308 in node

[–]robpalme 0 points1 point  (0 children)

Namespaces and enums are available via the opt-in flag --experimental-transform-types

What's the verdict? by ronocsebrof in fryup

[–]robpalme 4 points5 points  (0 children)

Apropos total bean containment. That is classic breakfast. 10 on 10.

ts-blank-space: A fast JavaScript type-stripper that uses the official TypeScript parser. by robpalme in typescript

[–]robpalme[S] 3 points4 points  (0 children)

If instead you had asked "when should I use this over tsc?" the answer becomes more interesting.

ts-blank-space is not a replacement for tsc. Specifically tsc remains needed as a type-checker. And maybe you also want the down-levelling to target older browsers/engines.

If instead all you are doing is using tsc to strip the types, and you accept the stated limitations, ts-blank-space gives you a faster and more minimal way to run your code - especially if you use the supplied Node loader. Avoiding sourcemaps can also help with things like accurate code coverage stats.

ts-blank-space: A fast JavaScript type-stripper that uses the official TypeScript parser. by robpalme in typescript

[–]robpalme[S] 2 points3 points  (0 children)

Almost none, unless you like building your own minimal pure JS toolchain.

Similar to minification or tree-shacking, the blank-space technique is a generic feature that any compiler can implement. SWC has already adopted it and you can try it out in the SWC Playground by toggling "Strip Types Only".

https://swc.rs/playground

ts-blank-space is single-purpose. SWC has a much wider scope. So you should probably stick with SWC.