Skip to content

Commit 3921dd6

Browse files
committed
Made the option arguments of the promise api optional!
1 parent 80d292e commit 3921dd6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

index.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ declare module '@isomorphic-git/lightning-fs' {
1212
* @param filepath
1313
* @param options
1414
*/
15-
mkdir(filepath: string, options: FS.MKDirOptions | undefined): Promise<void>
15+
mkdir(filepath: string, options?: FS.MKDirOptions): Promise<void>
1616

1717
/**
1818
* Remove directory
1919
* @param filepath
2020
* @param options
2121
*/
22-
rmdir(filepath: string, options: undefined): Promise<void>
22+
rmdir(filepath: string, options?: undefined): Promise<void>
2323

2424
/**
2525
* Read directory
@@ -29,18 +29,18 @@ declare module '@isomorphic-git/lightning-fs' {
2929
* @param options
3030
* @returns The file list.
3131
*/
32-
readdir(filepath: string, options: undefined): Promise<string[]>
32+
readdir(filepath: string, options?: undefined): Promise<string[]>
3333

34-
writeFile(filepath: string, data: Uint8Array | string, options: FS.WriteFileOptions | undefined | string): Promise<void>
34+
writeFile(filepath: string, data: Uint8Array | string, options?: FS.WriteFileOptions | string): Promise<void>
3535

36-
readFile(filepath: string, options: FS.ReadFileOptions | undefined | string): Promise<Uint8Array>
36+
readFile(filepath: string, options?: FS.ReadFileOptions | string): Promise<Uint8Array>
3737

3838
/**
3939
* Delete a file
4040
* @param filepath
4141
* @param options
4242
*/
43-
unlink(filepath: string, options: undefined): Promise<void>
43+
unlink(filepath: string, options?: undefined): Promise<void>
4444

4545
/**
4646
* Rename a file or directory
@@ -54,14 +54,14 @@ declare module '@isomorphic-git/lightning-fs' {
5454
* @param filepath
5555
* @param options
5656
*/
57-
stat(filepath: string, options: undefined): Promise<FS.Stats>
57+
stat(filepath: string, options?: undefined): Promise<FS.Stats>
5858

5959
/**
6060
* Like fs.stat except that paths to symlinks return the symlink stats not the file stats of the symlink's target.
6161
* @param filepath
6262
* @param options
6363
*/
64-
lstat(filepath: string, options: undefined): Promise<FS.Stats>
64+
lstat(filepath: string, options?: undefined): Promise<FS.Stats>
6565

6666
/**
6767
* Create a symlink at filepath that points to target.
@@ -76,14 +76,14 @@ declare module '@isomorphic-git/lightning-fs' {
7676
* @param options
7777
* @returns The link string.
7878
*/
79-
readlink(filepath: string, options: undefined): Promise<string>
79+
readlink(filepath: string, options?: undefined): Promise<string>
8080

8181
/**
8282
* Create or change the stat data for a file backed by HTTP. Size is fetched with a HEAD request. Useful when using an HTTP backend without urlauto set, as then files will only be readable if they have stat data. Note that stat data is made automatically from the file /.superblock.txt if found on the server. /.superblock.txt can be generated or updated with the included [standalone script](https://github.com/isomorphic-git/lightning-fs/blob/main/src/superblocktxt.js).
8383
* @param filepath
8484
* @param options
8585
*/
86-
backFile(filepath: string, options: FS.BackFileOptions | undefined): Promise<void>
86+
backFile(filepath: string, options?: FS.BackFileOptions): Promise<void>
8787

8888
/**
8989
* @param filepath

0 commit comments

Comments
 (0)