/** * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * @format */ /// /// import FileRepository from './FileRepository'; export type HashOpts = { /** * What differences between files should we be insensitive to when generating * a hash? Defaults to line-ending insensitivity */ insensitivity?: 'none' | 'line-ending' | 'whitespace'; }; /** * Creates a hash from content, attempting to normalize for line-feeds */ export declare class Hasher { private readonly hash; private readonly hashOpts; constructor(hashOpts?: HashOpts); feedContent(content: string | Buffer): Hasher; digest(): string; } /** * Convenience helper which hashes a single buffer */ export declare function hashContent(content: string | Buffer, opts?: HashOpts): string; /** * Helper to hash a file/directory belonging to a repository */ export declare function hashFileOrDirectory(name: string, repo: FileRepository, opts?: HashOpts): Promise;