@rvoh/dream
    Preparing search index...

    Function cloneDeepSafe

    • Accepts any value and returns a valid clone of that object. Dream instances, Query instances, and other special types are automatically cloned using their specialized cloning methods.

      Type Parameters

      • T

      Parameters

      • original: T

        The value to clone

      • OptionalunsupportedTypeCloneFunction: <U>(x: U) => U

        Optional function to handle cloning of unsupported types. If not provided, an error will be thrown for unsupported types.

      Returns T

      Either a clone of the original value, or the original value itself for immutable types

      When an unsupported type is encountered and no unsupportedTypeCloneFunction is provided