public unsafe void ToManaged(out Exception?value)
        {
            if (slot.Type == MarshalerType.None)
            {
                value = null;
                return;
            }
            if (slot.Type == MarshalerType.Exception)
            {
                // this is managed exception round-trip
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
                value = (Exception)((GCHandle)slot.GCHandle).Target;
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
                return;
            }

            JSObject?jsException = null;
            if (slot.JSHandle != IntPtr.Zero)
            {
                // this is JSException round-trip
                jsException = JavaScriptExports.CreateCSOwnedProxy(slot.JSHandle);
            }

            string?message;
            ToManaged(out message);

            value = new JSException(message !, jsException);
        }
 public unsafe void ToManaged(out JSObject?value)
 {
     if (slot.Type == MarshalerType.None)
     {
         value = null;
         return;
     }
     value = JavaScriptExports.CreateCSOwnedProxy(slot.JSHandle);
 }