the diff
function return type is Diff | void
however it returns null
in line 152:
|
export function diff( |
|
a: AnyJson, |
|
b: AnyJson, |
|
tolerance = Infinity |
|
): Diff | void { |
|
let result: Diff = []; |
|
if (gatherDiff(a, b, tolerance, [], result) || result.length > tolerance) |
|
return [[[], b]]; |
|
if (result.length === 0) return null; |
|
return result; |
|
} |
I can prepare a PR if it helps