I am passionate about creation, be it code or written. I believe that knowledge should be sharee. If we all gave a little bit of our time to helping the each other, the world would be a better place.
Granted, I could have chosen better wording. Most of the times I come across people hyping TS it's usually "it'll make you faster". The way I work, fast is not a metric I focus on. But using that, I have spent more time doing something in typescript than I would have if It were just JavaScript.
It's not that I don't like it, I'm just not convinced more than anything. JSDoc you say, I'll have a look at it .
I like the idea of JS Doc TS but in my judgement you have to be good with TypeScript first before trying to tackle JS Doc TS (and it has an even larger hurdle for initial setup). The best JS Doc TS example I know of is Preact.
Rich Harris
@rich_harris
Moved some of my smaller libs to JSDoc TS; thoroughly recommend it. Among other things, the resulting code is generally smaller than transpiled code. Building, testing etc all become much less finicky. And .d.ts files are still generated from source code twitter.com/swyx/status/13…
Interesting counter-trend - maintainers of large open source projects like @Sveltejs and @Deno_land are moving *AWAY* from writing their internals in TypeScript
Just at the same time when the wider dev world is falling in love with TS.
Reasons: build times and code complexity. https://t.co/a74GAoYhwp
I am passionate about creation, be it code or written. I believe that knowledge should be sharee. If we all gave a little bit of our time to helping the each other, the world would be a better place.
I'm a selftaught (web) developer. On sunny days, you can find me hiking through the Teutoburg Forest, on rainy days coding or with a good fiction novel in hand.
Most of the times I come across people hyping TS it's usually "it'll make you faster"
The thing here is - it does make you faster on 'common' development projects. This implies, you:
work in a team
have a dev workflow including code review, exhaustive testing, and so forth
re-write a bunch of features in each sprint phase
I think not being convinced is okay. My portfolio is written in JS as well. And I see no good reason to rewrite it just for the sake of adding Typescript to the codebase. The last two hackathons on dev.to, I wrote using Typescript. I didn't work on them regularly. Since they use several layers of abstraction, VSCode's TS intellisense was really helpful to understand
That's what I meant about the "you'll thank every developer later" part. The less mental capacity you use memorising what you built earlier, the easier it is to plan what to write next. Or whether you can re-use or refactor your modules.
I am passionate about creation, be it code or written. I believe that knowledge should be sharee. If we all gave a little bit of our time to helping the each other, the world would be a better place.
I am passionate about creation, be it code or written. I believe that knowledge should be sharee. If we all gave a little bit of our time to helping the each other, the world would be a better place.
Granted, I could have chosen better wording. Most of the times I come across people hyping TS it's usually "it'll make you faster". The way I work, fast is not a metric I focus on. But using that, I have spent more time doing something in typescript than I would have if It were just JavaScript.
It's not that I don't like it, I'm just not convinced more than anything. JSDoc you say, I'll have a look at it .
Thank you
I like the idea of JS Doc TS but in my judgement you have to be good with TypeScript first before trying to tackle JS Doc TS (and it has an even larger hurdle for initial setup). The best JS Doc TS example I know of is Preact.
Oh boy....
The thing here is - it does make you faster on 'common' development projects. This implies, you:
I think not being convinced is okay. My portfolio is written in JS as well. And I see no good reason to rewrite it just for the sake of adding Typescript to the codebase. The last two hackathons on dev.to, I wrote using Typescript. I didn't work on them regularly. Since they use several layers of abstraction, VSCode's TS intellisense was really helpful to understand
That's what I meant about the "you'll thank every developer later" part. The less mental capacity you use memorising what you built earlier, the easier it is to plan what to write next. Or whether you can re-use or refactor your modules.
This makes sense. When I do work on a project that uses it, then I'll dedicate more time to. As of now, I don't have a valid reason...
The whole affair drove me to build the portfolio with Eleventy instead - to actually see what javascript is necessary for it. For that, I'm grateful
Last time I checked there were additional hurdles to using TypeScript with 11ty.
Enough for me to consider using Astro instead if TypeScript was a critical consideration.
Oh no, Eleventy was after... I was initially building in Next.js with TS..
Then the TS thing made me decide to forgo frameworks altogether