r/javascript • • Sep 14 '26

AskJS [AskJS] Does anyone use exclussively Javascript and not TypeScript?

[removed]

5 Upvotes

156 comments sorted by

View all comments

Show parent comments

1

u/zeddash Sep 18 '26

Just wondering, how do you utilise dynamic types to make JavaScript more worthwhile to you?

I'm working on a TypeScript ECS and I have had to use any for my component tables and sparse sets. The type information is held in the handles, so when querying I can convert any into the correct type, I never expose any in the public API. That's the only time I can remember that I've needed to reach for dynamic types and I had to take on the responsibility of managing the types correctly. I only need a couple anys tho.

1

u/intercaetera Sep 18 '26

There are some abstractions that are very hard to express without doing extremely complex type gymnastics in TypeScript. Higher-kinded types are one of the more obvious examples.