diff --git a/index.d.ts b/index.d.ts index 9b08de9..aa31e57 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1 +1,4 @@ -export const diff: (left: string, right: string) => [] +export const diffChars: ( + left: string, + right: string, +) => [{ count: number; value: string; added: boolean; removed: boolean }] diff --git a/src/lib.rs b/src/lib.rs index 59177df..b3c2d02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; register_module!(example, init); fn init(module: &mut Module) -> Result<()> { - module.create_named_method("diff", diff_char)?; + module.create_named_method("diffChars", diff_char)?; Ok(()) }