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...1MJul 31, 2022 · 5 min readharshitjain.hashnode.dev
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...5RSRSep 21, 2021 · 4 min readharshitjain.hashnode.dev
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...2HKSep 1, 2021 · 4 min readharshitjain.hashnode.dev