projects/i-components/src/lib/components/xam-grid/clone-strategy.ts
Define the clone Strategy to be used by the XamGrid
Methods |
|
Public clone | ||||||
clone(data: any)
|
||||||
returns the same object from the parameter
Parameters :
Returns :
any
|
export class CloneStrategy {
/**
* returns the same object from the parameter
*
* @param {*} data
* @return {*}
* @memberof CloneStrategy
*/
public clone(data: any) {
if (data) {
return Object.create(
Object.getPrototypeOf(data),
Object.getOwnPropertyDescriptors(data)
);
}
}
}