Sling Academy
Home/TypeScript/Page 18

TypeScript

TypeScript: Transforming Union Types into Intersection Types

Updated: Dec 14, 2023
The world of TypeScript is filled with intricate, advanced type manipulation utilities. Two of the most prevalent and adaptable type constructs in TypeScript are the Union and Intersection types. This article dives deep into understanding......
How to Merge Multiple Objects in TypeScript (2 Approaches)

How to Merge Multiple Objects in TypeScript (2 Approaches)

Updated: Dec 03, 2023
This quick article shows you 2 different approaches to merging 2 or more objects in TypeScript. Without any further ado, let’s get our hands dirty by writing some code. Using the spread operator There are some important things......

How to Use Variables to Set Object Keys in TypeScript

Updated: Dec 03, 2023
There might be cases where you want to use a variable as a dynamic key of an object in TypeScript. The following examples will show you how to do that. Example 1 const key1 = 123; // number const key2 = 'puppy'; // string key const......
← PreviousPage 18 of 18