File

projects/i-components/src/lib/components/xam-grid/clone-strategy.ts

Description

Define the clone Strategy to be used by the XamGrid

Index

Methods

Methods

Public clone
clone(data: any)

returns the same object from the parameter

Parameters :
Name Type Optional
data any No
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)
      );
    }
  }
}

result-matching ""

    No results matching ""