/// import { ContextFile } from '../context-file'; export type StrategyFunction = (commonAncestorFile: ContextFile | undefined, existingFile: ContextFile | undefined, proposedFile: ContextFile | undefined, options?: {}) => ContextFile | undefined; export declare class MergeStrategies { /** * A strategy that always resolves to the proposed file. * @returns the proposed file. */ static alwaysUpdate: StrategyFunction; /** * A strategy that always resolves to the existing file. * @returns the existing file. */ static neverUpdate: StrategyFunction; /** * A strategy that resolves to the proposed file when an existing file does not exist already. * Otherwise, resolves to the existing file. */ static onlyAdd: StrategyFunction; /** * A strategy that performs a three way merge between the existing, proposed, and common * ancestor files. The resolved file may contain conflict markers if the files can not be * cleanly merged. * * The provided files' contents must be UTF-8 encoded in order for the strategy to produce * meaningful output. The strategy attempts to detect if the input files are binary. If * the strategy detects a merge conflict in a binary file, it always returns the * proposedFile. */ static threeWayMerge: StrategyFunction; /** * A strategy that performs a three way merge between the existing, proposed, and common * ancestor files. This strategy resolves conflicts by selecting the proposedFile's side * of each conflict. */ static preferProposed: StrategyFunction; /** * A strategy that performs a three way merge between the existing, proposed, and common * ancestor files. This strategy resolves conflicts by selecting the existingFile's side * of each conflict. */ static preferExisting: StrategyFunction; } /** * Returns whether the given Buffer is binary or not using a heuristic based * approach of checking for null bytes in the beginning of the file contents. */ export declare function isBinary(fileBuffer?: Buffer): boolean;