Deep Copy aka Clone objects using TypeScript

Share this video with your friends

Send Tweet

You can create copies of JavaScript objects by coping around properties e.g. const x = {foo: 123}; const y = { foo: x.foo }. However doing this manually for deep objects can be time consuming. In this lesson we cover one way of deep copying simple objects in TypeScript.

Harminder
~ 6 years ago

Weird that this video is on egghead, teaching the worst way to do deep clone of an object and also it has nothing to do with Typescript at all.

Rob Simpson
~ 6 years ago

Would it be wise to have this video showing this technique that is known to be an anti-pattern of deep cloning?