// Copyright 2018-2026 the Deno authors. MIT license. // This module is browser compatible. /** Ways that lines in a diff can be different. */ export type DiffType = DiffResult["type"]; /** * Represents the result of a diff operation. * @typeParam T The type of the value in the diff result. */ export type DiffResult = ChangedDiffResult | CommonDiffResult; /** * Represents the result of a common diff operation. * @typeParam T The type of the value in the diff result. */ export type CommonDiffResult = { type: "common" | "truncation"; value: T; }; /** * Represents the result of a changed diff operation. * @typeParam T The type of the value in the diff result. */ export type ChangedDiffResult = { type: "removed" | "added"; value: T; details?: DiffResult[]; };