1.83 kBTypeScriptView Raw
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7import { Diff } from './cleanupSemantic';
8import type { DiffOptions, DiffOptionsNormalized } from './types';
9export declare const printDeleteLine: (line: string, isFirstOrLast: boolean, { aColor, aIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder, }: DiffOptionsNormalized) => string;
10export declare const printInsertLine: (line: string, isFirstOrLast: boolean, { bColor, bIndicator, changeLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder, }: DiffOptionsNormalized) => string;
11export declare const printCommonLine: (line: string, isFirstOrLast: boolean, { commonColor, commonIndicator, commonLineTrailingSpaceColor, emptyFirstOrLastLinePlaceholder, }: DiffOptionsNormalized) => string;
12export declare const hasCommonDiff: (diffs: Array<Diff>, isMultiline: boolean) => boolean;
13export declare type ChangeCounts = {
14 a: number;
15 b: number;
17export declare const countChanges: (diffs: Array<Diff>) => ChangeCounts;
18export declare const printAnnotation: ({ aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator, includeChangeCounts, omitAnnotationLines, }: DiffOptionsNormalized, changeCounts: ChangeCounts) => string;
19export declare const printDiffLines: (diffs: Array<Diff>, options: DiffOptionsNormalized) => string;
20export declare const createPatchMark: (aStart: number, aEnd: number, bStart: number, bEnd: number, { patchColor }: DiffOptionsNormalized) => string;
21export declare const diffStringsUnified: (a: string, b: string, options?: DiffOptions | undefined) => string;
22export declare const diffStringsRaw: (a: string, b: string, cleanup: boolean) => Array<Diff>;