chintanonwebchintanonweb.hashnode.dev·Apr 29, 2024The ABCs of TypeScript: Exploring Enums, Types, and InterfacesEnum vs Type vs Interface in TypeScript: What to Use and When? Introduction In TypeScript, developers often encounter situations where they need to define custom data types. While enums, types, and interfaces are all tools for achieving this, they se...DiscussTypeScript
Eklal Budhathokiblogs.ebudhathoki.com.np·Apr 28, 2024Generic Reusable Component ReactGeneric types are use mainly to create reusable components with type-safety. First, lets create a simple component first. import React from 'react' type TSelectOptions = { label: string, value: string } type TSelectProps = { options: TSelectOptions...DiscussTypeScript
Charles Opute Odilichalu.hashnode.dev·Apr 25, 2024Using Generics in Typescript to Ensure Symmetry in Function ArgumentsFunctions in JavaScript can take arguments and we can use Typescript to enforce a type on each argument, such that we would get build time errors if the function gets called with arguments of the wrong type. What can be tricky and often elusive with ...Discuss·44 readsfunction signatures
Sadanand gadwalsadanandgadwal.hashnode.dev·Apr 20, 2024Mastering TypeScript: A Comprehensive GuideTypeScript is an open-source programming language developed by Microsoft that builds upon JavaScript by adding optional static typing, interfaces, classes, and other features to help developers write robust and scalable code. It compiles to plain Jav...Discuss·20 likesTypeScript
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·101 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