Skip to content

Commit

Permalink
Merge pull request #97 from tachibana-shin/patch-1
Browse files Browse the repository at this point in the history
interpolation for `readFile` with `utf8`
  • Loading branch information
jcubic authored Jun 9, 2022
2 parents b86383a + d4e48bf commit 9c4e818
Show file tree
Hide file tree
Showing 3 changed files with 16,323 additions and 62 deletions.
6 changes: 4 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ declare module '@isomorphic-git/lightning-fs' {

writeFile(filepath: string, data: Uint8Array | string, options: FS.WriteFileOptions | undefined | string, cb: (err: Error) => void): void

readFile(filepath: string, options: FS.ReadFileOptions | undefined | string, cb: (err: Error, data: Uint8Array | string) => void): void
readFile(filepath: string, options: 'utf8' | { encoding: 'utf8' }, cb: (err: Error, data: string) => void): void
readFile(filepath: string, options: {} | void, cb: (err: Error, data: Uint8Array) => void): void

/**
* Delete a file
Expand Down Expand Up @@ -149,7 +150,8 @@ declare module '@isomorphic-git/lightning-fs' {

writeFile(filepath: string, data: Uint8Array | string, options?: FS.WriteFileOptions | string): Promise<void>

readFile(filepath: string, options?: FS.ReadFileOptions | string): Promise<Uint8Array | string>
readFile(filepath: string, options: 'utf8' | { encoding: 'utf8' }): Promise<string>
readFile(filepath: string, options?: {}): Promise<Uint8Array>

/**
* Delete a file
Expand Down
Loading

0 comments on commit 9c4e818

Please sign in to comment.