Ankush Thakurankushthakur.hashnode.dev·Feb 20, 2024Mastering TypeScript: Unveiling Types and TechniquesHey TECHIE curious about TypeScript's ? Let's explore the world of types together, unraveling their importance and how they make your code stronger. There are various types available in Typescript String It represents the string value like "Hello Wo...Discuss·108 readsTypeScript
Aditya Revankaradityarevankar.hashnode.dev·Feb 9, 2024Generics for dummiesLet’s say you have a function that needs to return the first element of an array. Array can be of type either string or integer. Here we have get access to the firstElement which is a type of string. But we don't have access to default string functi...DiscussTypeScript
IDits-id.hashnode.dev·Feb 8, 2024Generics in TypeScript: A Complete Guide (Part 2)In the previous part of this blog, we learned what generics are and how to use them in functions. In this part, we will see how to use generics in types, and how to give default values to generic types. How to use generics in types Generics are not o...DiscussTypeScript
IDits-id.hashnode.dev·Feb 8, 2024Generics in TypeScript: A Complete Guide (Part 1)Generics are a powerful feature of TypeScript that allow you to write flexible and reusable code. In this blog, I will explain what generics are, why they are useful, and how to use them in your TypeScript projects. Let's go! 🌟 What are generics and...Discuss·41 readsTypeScript
Nishant Sharma4learners.hashnode.dev·Jan 21, 2024Chip component with Search filter - Part 1What are we building ? https://www.loom.com/share/7d54b6006a7242c19f58514739889d25?sid=f313cb47-2fc6-47be-9964-8c1a92d0231e Go visit site at Chip component with search filter. Project setup Create a new vite project run npx create-vite@latest my-vi...Discusssearch filter
Mark Maksimarkmaksi.hashnode.dev·Jan 3, 2024Master TypeScript GenericsGenerics is a concept in programming that allows us to create reusable code. I will first talk about what generics are and then I will show some simple and advanced examples to enforce what we've learned. If you wish to see a real life example of gen...Discuss·35 likes·1.9K readsTypeScript
Abdul Shaikabdulshaik.hashnode.dev·Dec 6, 2023Unlocking Flexibility with Generic Classes in TypeScriptGeneric classes in TypeScript play a pivotal role in enhancing flexibility and reusability in code design. They empower developers to create classes that can work with a diverse range of data types, providing a dynamic and adaptable foundation for bu...Discuss100DaysOfCode
Fernando De La Madriddeadcode.hashnode.dev·Dec 5, 2023Generic Types in TypeScriptThe second third of this holiday 🦌 TypeScript challenge is here. In our previous post, we touched a bit on generics and explored the fundamentals of keyof and typeof. In this challenge we will dive typer into Generic types and how they allow us to h...DiscussTypeScript FundamentalsTypeScript
Abdul Shaikabdulshaik.hashnode.dev·Dec 5, 2023Mastering TypeScript Generics: From Arrays to Arrow Functions with Type SafetyMastering Generics with Arrays and Arrow Functions in TypeScript Example 1: Generics in Arrays // Without Generics function getFirstItem(arr: (string | number)[]): (string | number) { return arr[0]; } let arr1 = getFirstItem([1, 2, 3]); ...Discuss100DaysOfCode
Gaurav J Somanigaurav750.hashnode.dev·Oct 30, 2023Mastering TypeScript: Beyond the Basics with Interfaces, Generics, and MoreMany of us have already dabbled with the basic types TS provides and experienced the safety it provides. But Typescript, like an iceberg, has layers beneath its surface - features that can make our code more flexible, robust and maintainable. In this...Discuss·2 likes·46 readsTypeScript Generics