Skip to content

Commit

Permalink
Revert "feat: add ts overload to getFileContents"
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell committed Aug 21, 2022
1 parent 7de9e18 commit e8f7986
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
end_of_line = lf
insert_final_newline = true

[*.{js,json,ts}]
[*.{js,json}]
indent_style = space
indent_size = 4

Expand Down
24 changes: 0 additions & 24 deletions source/operations/getFileContents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,6 @@ import {

const TRANSFORM_RETAIN_FORMAT = (v: any) => v;

type GetFileContentsBasicOptions = Omit<GetFileContentsOptions, "format" | "details">;

export async function getFileContents(
context: WebDAVClientContext,
filePath: string,
options?: GetFileContentsBasicOptions & { format?: "binary"; details?: false }
): Promise<BufferLike>;
export async function getFileContents(
context: WebDAVClientContext,
filePath: string,
options: GetFileContentsBasicOptions & { format: "text"; details?: false }
): Promise<string>;
// details
export async function getFileContents(
context: WebDAVClientContext,
filePath: string,
options: GetFileContentsBasicOptions & { format?: "binary"; details: true }
): Promise<ResponseDataDetailed<BufferLike>>;
export async function getFileContents(
context: WebDAVClientContext,
filePath: string,
options: GetFileContentsBasicOptions & { format: "text"; details: true }
): Promise<ResponseDataDetailed<string>>;

export async function getFileContents(
context: WebDAVClientContext,
filePath: string,
Expand Down

0 comments on commit e8f7986

Please sign in to comment.