Object Spread

Learn about object spread and how to leverage it in TypeScript for cleaner and more efficient code.

Introduction to object spread

When working with basic JavaScript objects, we often need to copy the properties of one object to another or do some mixing and matching of properties from various objects. In TypeScript, we can use an ES7 technique known as object spread to accomplish this.

Consider the following code:

Get hands-on with 1400+ tech skills courses.