Is this the proper method for creating a duplicate of an object?
class ObjectWrapper {
private _obj;
/***
* Copy object passed as argument to this._obj
*/
constructor (_obj: Object) {
this._obj = _obj;
}
/**
Return copy of this._obj (Return copied version of this._obj)**
* @return Object
*/
get obj() {
return this._obj;
}
I am curious about the concept of "returning a copy."