Make JS API usable

This commit is contained in:
Andras Schmelczer 2025-04-02 21:07:33 +01:00
parent 565372b526
commit 40323c33ee
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 54 additions and 55 deletions

View file

@ -12,7 +12,7 @@
use core::str;
use base64::{Engine as _, engine::general_purpose::STANDARD};
use cursor::OwnedTextWithCursors;
use cursor::TextWithCursors;
use errors::SyncLibError;
use wasm_bindgen::prelude::*;
@ -110,9 +110,9 @@ pub fn merge_text(parent: &str, left: &str, right: &str) -> String {
#[must_use]
pub fn merge_text_with_cursors(
parent: &str,
left: OwnedTextWithCursors,
right: OwnedTextWithCursors,
) -> OwnedTextWithCursors {
left: TextWithCursors,
right: TextWithCursors,
) -> TextWithCursors {
set_panic_hook();
reconcile::reconcile_with_cursors(parent, left.into(), right.into()).into()