Function clone

  • Those data types can be cloned: Plain object, Array, TypedArray, number, string, null, undefined. Those data types will be assgined using the orginal data: BUILTIN_OBJECT Instance of user defined class will be cloned to a plain object, without properties in prototype. Other data types is not supported (not sure what will happen).

    Caution: do not support clone Date, for performance consideration. (There might be a large number of date in series.data). So date should not be modified in and out of .

    Type Parameters

    • T extends unknown

    Parameters

    • source: T

    Returns T