// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 DeRec Alliance. All rights reserved.
//! Converts [`DeRecEvent`] values to plain JS objects for TypeScript
//! consumers.
//!
//! The wire shape is shared with the FFI bridge via
//! [`crate::protocol::events::wire`] — see that module for the
//! per-variant docs and the field-name conventions.
use Serialize;
use JsValue;
use crate;
use cratejs_error;