Diff Types (dw::util::Diff)

Type Definition Description


type Diff = { matches: Boolean, diffs: Array<Difference> }

Describes the entire difference between two values.

Example with no differences:

{ "matches": true, "diffs": [ ] }

Example with differences:

{ "matches": true, "diffs": [ "expected": "4", "actual": "2", "path": "(root).a.@.d" ] }

See the diff function for another example.


type Difference = { expected: String, actual: String, path: String }

Describes a single difference between two values at a given structure.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub