Function isClone

  • Clone a data with type checking.

    Clones an instance following type T, with type checking. If the target input value or its member variable contains a class instance having methods, those methods would not be cloned.

    In such reason, when input value is not matched with the type T, it returns null value instead. Otherwise, there's no problem on the input value, cloned data would be returned.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: T

      A value to be cloned

    Returns Resolved<T> | null

    Cloned data when exact type, otherwise null

    Jeongho Nam - https://github.com/samchon

  • Clone a data with type checking.

    Clones an instance following type T, with type checking. If the target input value or its member variable contains a class instance having methods, those methods would not be cloned.

    In such reason, when input value is not matched with the type T, it returns null value instead. Otherwise, there's no problem on the input value, cloned data would be returned.

    Type Parameters

    • T

      Type of the input value

    Parameters

    • input: unknown

      A value to be cloned

    Returns Resolved<T> | null

    Cloned data when exact type, otherwise null

    Jeongho Nam - https://github.com/samchon