Merge pull request #25771 from acchou/master

memory-fs: make options arguments optional
This commit is contained in:
Daniel Rosenwasser
2018-05-21 17:59:29 -07:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -43,13 +43,13 @@ declare class MemoryFileSystem {
writeFileSync(_path: string, content: string | Buffer, encoding?: string): void;
createReadStream(
path: string, options: {
path: string, options?: {
start: number;
end: number;
}
): any;
createWriteStream(path: string, options: any): any;
createWriteStream(path: string, options?: any): any;
exists(path: string, callback: (isExist: boolean) => any): any;

View File

@@ -15,3 +15,7 @@ fs.writeFile('hello', 'hahahahah', 'utf-8', function (err) {
console.log(err.message);
}
});
fs.createReadStream('hello');
fs.createWriteStream('hello');