WIP - add extractor, generate snippet_data
This commit is contained in:
38
node_modules/read-chunk/index.d.ts
generated
vendored
Normal file
38
node_modules/read-chunk/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/// <reference types="node"/>
|
||||
|
||||
declare const readChunk: {
|
||||
/**
|
||||
Read a chunk from a file asyncronously.
|
||||
|
||||
@param filePath - The path to the file.
|
||||
@param startPosition - Position to start reading.
|
||||
@param length - Number of bytes to read.
|
||||
@returns The read chunk.
|
||||
|
||||
@example
|
||||
```
|
||||
import readChunk = require('read-chunk');
|
||||
|
||||
// foo.txt => hello
|
||||
|
||||
readChunk.sync('foo.txt', 1, 3);
|
||||
//=> 'ell'
|
||||
```
|
||||
*/
|
||||
(filePath: string, startPosition: number, length: number): Promise<Buffer>;
|
||||
|
||||
/**
|
||||
Read a chunk from a file synchronously.
|
||||
|
||||
@param filePath - The path to the file.
|
||||
@param startPosition - Position to start reading.
|
||||
@param length - Number of bytes to read.
|
||||
@returns The read chunk.
|
||||
*/
|
||||
sync(filePath: string, startPosition: number, length: number): Buffer;
|
||||
|
||||
// TODO: Remove this for the next major release
|
||||
default: typeof readChunk;
|
||||
};
|
||||
|
||||
export = readChunk;
|
||||
Reference in New Issue
Block a user