📅  最后修改于: 2022-03-11 15:04:09.545000             🧑  作者: Mango
import { createReadStream, ReadStream } from 'fs';
var readStream: ReadStream = createReadStream('./data.txt');
setTimeout(() => {
const data = readStream.read(10);
console.log(data);
}, 10);