martin ↑ pfp
martin ↑
@martin
just learned typescript passes object by reference not value unlock
2 replies
0 recast
11 reactions

nishu pfp
nishu
@nishu
since javascript πŸ˜…
1 reply
0 recast
1 reaction

martin ↑ pfp
martin ↑
@martin
Yeah I guess it’s a JavaScript thing Just had no idea for some reason, assumed it was all by value not reference
2 replies
0 recast
1 reaction

iain pfp
iain
@iain
there's a nice cloneDeep module for this that does what you think for cloning. if it's just a normal object you can do Object.assign({}, objectToClone) to clone.
1 reply
0 recast
1 reaction

nishu pfp
nishu
@nishu
ye
0 reply
0 recast
0 reaction