// Type definitions for read-chunk v2.1.0 // Project: https://github.com/sindresorhus/read-chunk // Definitions by: crispybee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// export = ReadChunk; /** * Asynchronous: Reads a chunk from a file. Returns a Promise. * @param {string} filePath The path to the file. * @param {number} startingPosition Position to start reading. * @param {number} length Number of bytes to read. * @return {Promise} Returns a Promise. */ declare function ReadChunk(filePath: string, startingPosition: number, length: number): Promise; declare namespace ReadChunk { /** * Synchronous: Reads a chunk from a file. Returns a Buffer. * @param {string} filePath The path to the file. * @param {number} startingPosition Position to start reading. * @param {number} length Number of bytes to read. * @return {Buffer} Returns a Buffer. */ function sync(filePath: string, startingPosition: number, length: number): Buffer; }