How to Push Objects into an Array in TypeScript?

typescript add object to array

While working with TypeScript arrays, you should know how to add objects to arrays in TypeScript. In this article, I’ll explain multiple ways to add objects to arrays in TypeScript, highlighting best practices I’ve learned from real-world projects. So, let’s dive in! TypeScript arrays are strongly typed, meaning they can be restricted to contain specific … read more…

How To Get String Between 2 Characters In TypeScript?

Get string between 2 characters in Typescript

When working with strings in TypeScript projects, I frequently need to extract a portion of text between specific characters. In this typescript tutorial, we will see how to get string between 2 characters in typescript using different methods. For example, the string is, Mindvalley-Afest#2023, the first character is – and the second character is #, … read more…

TypeScript Switch with Enums [With Examples]

TypeScript Switch with Enums

Recently, I was working on a large TypeScript project that required handling different user roles in a clean and maintainable manner. The requirements included different UI elements and access permissions based on user roles – admin, editor, viewer, etc. That’s when I realized how powerful TypeScript’s switch statements combined with enums can be. In this … read more…

How To Convert String To Double In TypeScript

convert string to double in typescript

Recently, I was building a financial dashboard application where I needed to convert string inputs to double values for calculations. The challenge with TypeScript is that it doesn’t have a specific “double” type like some other languages. Instead, we use the number type, which can represent both integers and floating-point values. In this TypeScript tutorial, … read more…

How To Get String After Character In TypeScript

Get string after character in Typescript

In this typescript tutorial, we will see how to get a string after a character in typescript using different methods. For example, the string is “fest-2025”, then the character is ‘-‘, and after that, the string is 2025. Here are the five methods to get a string after a character in TypeScript that we are going to … read more…

TypeScript Check If String Is Number – 6 Proven Methods

typescript check if string is number

When working with user input or data from external sources in TypeScript, I often need to verify if a string contains only numeric characters. This is a common requirement in form validation, data processing, and many other scenarios. In this article, I’ll share several reliable methods I’ve used over my years of TypeScript development to … read more…

How to Sort Arrays of Objects in TypeScript

typescript sort array of objects

Recently, I was working on a project where I needed to sort an array of customer objects by different properties like name, purchase date, and total spending. As a TypeScript developer, I’ve found that the built-in Array.sort() method is very useful, but it requires some TypeScript-specific knowledge to use correctly with complex object arrays. In … read more…

TypeScript keyof with Strings: Complete Guide with Examples

typescript keyof string

Recently, I was working on a TypeScript project where I needed to enforce type safety when accessing object properties. The challenge was to restrict access only to existing property keys of an object. That’s when I discovered the power of the keyof operator with string types. In this article, I’ll share my experience using TypeScript’s … read more…

How to Compare Dates in TypeScript

typescript compare dates

When I first started using TypeScript, comparing dates felt confusing. I assumed I could just use == or === like I do with numbers or strings—but that didn’t work as expected. In TypeScript (and JavaScript), dates are objects. So, if you compare two date objects directly, you’re actually comparing their references, not their values. To … read more…

Working with Multiline Strings in TypeScript

typescript multiline string

Working with multiline strings is a common occurrence in my TypeScript projects. Whether I’m creating HTML templates, SQL queries, or formatted text outputs, handling text that spans multiple lines is essential. In the past, concatenating strings with the + operator or using arrays with join() were common workarounds. But TypeScript, following JavaScript’s evolution, now offers … read more…

How to Use TypeScript Enum Reverse Mapping

typescript enum reverse mapping

Recently, I was working on a TypeScript project where I needed to convert numeric values back to their corresponding enum names. This is when I researched and found out enum reverse mapping feature. While most developers know how to get enum values from keys, going the other way around isn’t as widely understood. In this … read more…

Add Property to Object in TypeScript

typescript add property to object

Are you working with TypeScript objects? Then you may be required to add properties to objects. There are various methods to do so. In this tutorial, I’ll show you several ways to add properties to TypeScript objects, from basic approaches to more advanced techniques for special cases. Let’s dive in! TypeScript Objects and Properties TypeScript … read more…

How to Compare Strings in TypeScript

Compare Strings in TypeScript

When working with TypeScript applications, I find myself comparing strings almost daily. A few examples of when I was comparing strings include sorting arrays, validating user input, or checking conditions in my code. What seems like a simple operation actually has several nuances that can trip up even experienced developers. In this article, I’ll walk … read more…

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App