What are Generics in Typescript?Introduction Over the course of the last few years, Typescript has emerged as the de-facto standard for writing type-safe Javascript code. This added type-safety gives developers confidence in their code and helps them catch errors even before the co...5 min read·harshitjain.hashnode.dev1MJul 31, 2022
TypeScript Best Practices #2 – Use More Precise Type Than ‘string’Introduction The best thing about typescript is that you can always start by using just the basic features of the language. You don't have to use every advanced feature of it right from the beginning. You can incrementally learn and implement stricte...4 min read·harshitjain.hashnode.dev5RSRSep 21, 2021
Typescript Best Practices #1 - Always prefer 'Type Declaration' over 'Type Assertion'In TypeScript, there are two ways of assigning a type to a variable. Type Declaration Type Assertion If you have ever written typescript code, you most probably would have used both of them at some point in time. So let's dive deep into what type d...4 min read·harshitjain.hashnode.dev2HKSep 1, 2021