Always return numbers instead of bigint
This commit is contained in:
parent
b7b22a63cd
commit
2bb647cdac
5 changed files with 92 additions and 75 deletions
|
|
@ -211,7 +211,7 @@ export function diff(
|
|||
|
||||
changedWasm.free();
|
||||
|
||||
return result;
|
||||
return result.map((item) => (typeof item === 'bigint' ? Number(item) : item));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -227,7 +227,7 @@ export function diff(
|
|||
*/
|
||||
export function undiff(
|
||||
original: string,
|
||||
diff: Array<number | string>,
|
||||
diff: Array<number | bigint | string>,
|
||||
tokenizer: BuiltinTokenizer = 'Word'
|
||||
): string {
|
||||
init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue