Frontmania ’23 – Emil van Galen – TypeScript inaccuracies? Let’s fix those types! – Emil van Galen

When coding in TypeScript, the return type of a function might turn out to be too broad (union type), too lenient (`any` type), or even incorrect. Leading to using type / non-null assertions, a false sense of type-safety security, or plain confusion. And to make things worse, those inaccurate return types are not exclusive to just libraries or your own code but also exist in the typings shipped with TypeScript. During the talk, we will explain various ways to get more accurate return types through slides and live coding. The topics to be covered are Generics, Function Overloading, Declaration Merging, Mapped Types, Conditional Types, Template Literal Types, and more. Besides showing off shiny TypeScript features, we will also go into naming conventions, maintainability, and unit testing of TypeScript types. This talk is for intermediate to advanced frontend developers with some experience in TypeScript. While having familiarity with TypeScript basics would be helpful, we will provide brief explanations and examples to ensure everyone can follow along seamlessly and gain insights into these powerful features to enhance their frontend development skills.

(Visited 7 times, 1 visits today)

About The Author

You might be interested in