modify d.ts, modify function name

This commit is contained in:
Jay 2020-08-26 10:25:48 +08:00
parent 657d47722f
commit f090f0acc0
2 changed files with 5 additions and 2 deletions

5
index.d.ts vendored
View File

@ -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 }]

View File

@ -16,7 +16,7 @@ static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
register_module!(example, init); register_module!(example, init);
fn init(module: &mut Module) -> Result<()> { fn init(module: &mut Module) -> Result<()> {
module.create_named_method("diff", diff_char)?; module.create_named_method("diffChars", diff_char)?;
Ok(()) Ok(())
} }