0:00 it is September 7th 2023 and you are
0:03 watching the code report it many years
0:04 ago in 2017 legendary JavaScript user
0:07 Kent C Dodds said I don't use typescript
0:09 so I don't ever plan on supporting it in
0:11 2019 he goes on to say you are
0:13 impassioned love of typescript is sort
0:15 of freaking me out and finally in 2023
0:17 comes capitulation typescript is one and
0:19 it's only a matter of time you're using
0:21 it whether you like it or not but this
0:23 is the sign of a good developer you have
0:24 to be open-minded and willing to adapt
0:26 to new tools and sometimes tools you
0:28 don't even like but the big question
0:29 here is did typescript really win
0:31 because recently the turns have started
0:33 to table a bunch of big open source
0:35 projects have decided to ditch
0:36 typescript in favor of vanilla
0:38 JavaScript to understand the shocking
0:40 turn of events we'll need to go back to
0:42 the very beginning in 2012 when
0:44 typescript was first released by
0:45 Microsoft nobody really cared at first
0:47 but then a few years later it was
0:49 adopted by the angular 2 framework which
0:51 everybody thought was crazy but here's
0:53 the thing first they think you're crazy
0:54 then they fight you then you change the
0:56 world or you go to jail by the early
0:58 2020s typescript was everywhere where at
1:00 which point most of its haters had been
1:02 converted into True Believers but now
1:03 right as we're about to reach the
1:05 Glorious climax of typescript saturation
1:07 you've got big libraries like svelte
1:09 drizzle and turbo deciding to ditch
1:11 typescript from their code bases to be
1:13 clear that just means that they're not
1:14 going to use typescript When developing
1:16 these libraries but as an end user in a
1:18 framework like svelt for example you're
1:19 still able to use typescript just like
1:21 normal but how could anyone possibly go
1:23 back to vanilla JS after using
1:24 typescript did they not remember runtime
1:26 errors like cannot read properties of
1:28 undefined did they not remember how hard
1:29 it is to refactor a code base where you
1:31 have no idea what anything is well these
1:33 people are a lot smarter than I am so
1:34 let's first look at this article from
1:36 dhh that creator of Ruby on Rails who's
1:38 getting rid of typescript and turbo
1:40 version 8. the main reason they're
1:41 getting rid of it is not because of the
1:42 compile step but rather because it
1:44 pollutes the code with quote type
1:46 gymnastics and there's a lot of Truth to
1:48 that especially when developing a
1:49 library I'm working on a library myself
1:51 called svelt fire and as you can see in
1:53 the code here I have to do my own type
1:55 gymnastics with typescript just to get
1:57 rid of some red squiggly lines in the
1:58 IDE now I could simply place this type
2:00 with any and not get any type inference
2:02 but then my boss would yell at me he's a
2:04 total who will abuse me emotionally and
2:06 physically if I don't code up to his
2:07 standards it's not easy being
2:09 self-employed furthermore I have the
2:10 compiler in strict mode which means I
2:12 have to use any anytime I don't want to
2:14 use an explicit type and that results in
2:16 code that's anything but beautiful let's
2:17 head over to turbo on GitHub and see how
2:19 people are reacting to this change well
2:21 it's an absolute dumpster fire and a lot
2:23 of developers are upset that their ts
2:24 contributions are now Dead on Arrival
2:26 but another huge project moving away
2:28 from typescript is spelled and the
2:30 reasoning is a bit different it's purely
2:31 practical and I recommend you read this
2:33 post by Rich Harris spelled 5 which may
2:35 come out later this year no longer uses
2:37 typescript and spelled kit is already
2:38 written in plain vanilla.js and the main
2:41 benefit is no compile step which is a
2:43 huge boost in productivity for a large
2:44 framework like this that may sound like
2:46 total chaos for a large complex project
2:48 but they're actually still getting most
2:50 of the benefits of typescript but doing
2:52 so with JS talk which is a standard
2:54 comment format where you declare types
2:56 and documentation with regular
2:57 JavaScript comments that can then be
2:59 used to generate rate types like a d.ts
3:01 file and most importantly provide
3:03 intellisense in your editor so you know
3:05 what the hell everything does and can
3:06 catch bugs early just like you can with
3:08 typescript that's the main reason I use
3:09 typescript in the first place so is it
3:11 time to just ditch it all together well
3:13 when it comes to building actual
3:14 applications with a tool like spell kit
3:16 or next JS I don't see myself leaving
3:18 typescript anytime soon those tools
3:19 integrate TS seamlessly and trying to
3:21 get the same results with JS doc would
3:23 be a total nightmare but one day I hope
3:25 we see the end of this holy war there's
3:27 currently a stage 1 ecmascript proposal
3:29 that would add optional type annotations
3:30 to JavaScript natively thus making
3:32 typescripts nearly obsolete this has
3:34 been the code report thanks for watching
3:36 and I will see you in the next one