mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-12 21:13:14 +08:00
10 lines
212 B
TypeScript
10 lines
212 B
TypeScript
import readChunk = require('read-chunk');
|
|
|
|
let chunk: Buffer = readChunk.sync('foo.txt', 1, 3);
|
|
|
|
readChunk('foo.txt', 1, 3).then(value => {
|
|
console.log(value);
|
|
}).catch(error => {
|
|
console.log(error);
|
|
});
|