BRIEFS logo BRIEFS

Why I'm Going 100% TypeScript in OSS and Teaching

01/09/2021 , 2m, 57s

Hello friends it is January 9th, this is a Saturday and I guess I'm recording this on a Saturday, okay, so um, I wanted to talk about today type script and why I am starting to think that I'm gonna be doing my material and typescription stuff so first of all, I started using TypeScript right toward the end of my time at PayPal we had been using flow for a long time and and I liked it it was okay, but it was very clear that TypeScript was gonna be the winner of this game and so I decided let's switch over to type.

Script so I made PayPal scripts completely. TypeScript supporting project and everything and and then the template I made default to type script and everything so like I was all in and I type script the PayPal or PP React. React component library that I was working on was completely in TypeScript and then I went full-time educator and I stopped using TypeScript and the reason that I have never used or I had never used TypeScript in my open source or in my instructional material is because I didn't wantIt to be a barrier for people So with open source I didn't want it to be the sort of thing that people couldn't contribute to open source because they didn't know TypeScript.

And for my my educational content, I didn't want to make it so that people couldn't enjoy my educational content because they couldn't they didn't know type script. And so like it would just drastically limit the number of people who could benefit. So a few things have changed for one for the whole time with my open source stuff.

I always use that as an excuse like no, I don't want to be a barrier for people butLike I knew that was bogus because anybody who's going to contribute to my project also needs to write some tests and that's basically what TypeScript is So they are going to need to learn how to write the tests and so yeah, it ends up being six is anyway, like if they don't know how to write test they're going to commit it and will help them write the test that'll be the same with text script.

And for my educational content, I talked with Ryan Florence about this and he told me that a long time ago, they went full on TypeScript and a big reason was because a lot of them were like a lot of the people they were teaching were already using TypeScript and also it like you don't have.

To go full on TypeScript on the educational material so like the people who don't know TypeScript they don't have to add types if you configure TypeScript correctly and then those of you or those people who are using TypeScript regularly and know it they'll get the editor hints and everything and and even if you're not using TypeScript yourself, if you're consuming an API that exposes types you get editor hints and everything's really nice.

So it ends up being a better experience for everybody and so that's why I'm gonna be switching completely over to TypeScript and I'll probably have something there to help people who don't know TypeScript yet as well. So anyway, hope you have aSplendid day. Bye.