better-diff
better-diff copied to clipboard
Case to improve
Case 1
Not quite right:
// A
interface ResultTypeMapper {
[OutputType.text]: { sourceA: string; sourceB: string };
[OutputType.alignedText]: { sourceA: string; sourceB: string };
[OutputType.noop]: void;
}
// B
interface ResultTypeMapper {
[OutputType.text]: { sourceA: string; sourceB: string };
[OutputType.prettyText]: { sourceA: string; sourceB: string };
[OutputType.alignedText]: { sourceA: string; sourceB: string };
[OutputType.noop]: void;
}
Case 2
A crash happends if you use serializedOutput
// A
console.log() && 2
// B
fn(console.log(2))
This one crashes with the same setup, I think is the same issue
1 2 3
// VS
3 1 2
Case 3
Wrong paren matching
console.log() && fn()
fn(console.log(2))