mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-01 03:20:46 +08:00
Merge pull request #25771 from acchou/master
memory-fs: make options arguments optional
This commit is contained in:
4
types/memory-fs/index.d.ts
vendored
4
types/memory-fs/index.d.ts
vendored
@@ -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;
|
||||
|
||||
|
||||
@@ -15,3 +15,7 @@ fs.writeFile('hello', 'hahahahah', 'utf-8', function (err) {
|
||||
console.log(err.message);
|
||||
}
|
||||
});
|
||||
|
||||
fs.createReadStream('hello');
|
||||
|
||||
fs.createWriteStream('hello');
|
||||
Reference in New Issue
Block a user