the lcs
function return type is AnyJson[] | void
however it returns null
in line 282:
|
export function lcs( |
|
a: AnyJson[], |
|
b: AnyJson[], |
|
tolerance = a.length + b.length |
|
): AnyJson[] | void { |
|
let result: AnyJson[] = []; |
|
return arrDiff(a, b, tolerance, aIdx => result.push(a[aIdx])) |
|
? result.reverse() |
|
: null; |
|
} |
I can prepare a PR if it helps