And at the very end, print me is the result, where we take in this text, we recurse a couple free times, and we get back our string results. Yay. I feel very cool and strong doing that. And this makes me happy. It brings me a lot of joy to mess with TypeScript in this way. But I totally understand if this is not for you, if you've never played with TypeScript before or done deep things in the type system, that's totally fine.
Again, this is not something you need to use on a day-to-day TypeScript basis, it's just some cool stuff I think that is fun to explore with some of the type system techniques and foundations. If you want to get started with TypeScript, I do have most of the concepts you need for this in a different folder in the same repo source slash foundations.
So that was fun. Let's wrap up. Let's talk about a little bit of other stuff for now. If you want to learn more, typescriptblind.org and theplaygrounds slash play are fantastic. They're open source online. I highly recommend. I also mentioned I have a book, Learning TypeScript, which you can absolutely try out. Its website has a lot of free open source articles and projects to help you flesh out your TypeScript understanding. And if books aren't for you, or if you just want more or another resource, I really like mattpocockstotaltypescript.com. If you're wondering, this is all cool stuff, what on earth am I going to do with it? Well, a couple places you can go after this, definitelytyped is one of the largest public open source repositories in the world.
It is the place that all third party types, so packages that don't describe how they look to TypeScripts, you can describe how they look in this repo exist. So if you want to say, look at React's type, because React has definitely typed types, you can go to definitelytyped, types, react, index DTS, and see a whole bunch of syntax that actually uses a lot of the features we played with today. So if we ever have a problem with a third party type, or there's a package you use that doesn't have type information, definitely typed is a place you can go to make progress on that, to make it better for everyone. Secondly, type challenges is a great repository. Also, they've got a really cute little homepage, type challenge that links to the GitHub. It's got a whole bunch of starting small, getting much more complex type challenges to flex the concepts we showed today. Type system is incredibly powerful and could actually model not just React but TypeScript itself. People have implemented TypeScript in the TypeScript type system. If you want to be one of those ridiculous people, this is a way to get yourself there. Or you can just use the easy and medium challenges to flesh out your basic TypeScript and foundational TypeScript type system features. Everything we've talked about today is, at the very least, built towards my book Learning TypeScript. Highly recommended. I think it's pretty good. Also, because I'm a full-time open source maintainer, anything you can send my way, in terms of love, appreciation, money, issues filed, pull requests sent will help me work for all of y'all. Similarly, TypeScript VS Lint is an independent project. We're not associated with any one company. So, anything you can do to help us to file bugs, to send code and send us money would really be appreciated, to help us continue to make TypeScript better for everyone. With all that being said, I had a great time with this. I hope you enjoyed it. You can find me online as JoshuakGoldberg on most sites, including by joshuakgoldberg.com.
Comments