Skip to content

Commit

Permalink
feat: add File type that supports RN
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited authored Aug 20, 2024
1 parent 3fd7c14 commit 372ca78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ export const findValueBetween = (plain: string, start: string, end: string): str
return plain.slice(startIndex, endIndex);
};

/**
* Special typing for React Native.
*/
export type ReactNativeFileFromURI = {
uri: string
name: string
type: string
size: number
};

export type FormDataFile = Blob | File | Buffer | ArrayBuffer | Uint8Array | ReactNativeFileFromURI;

interface HeadersLike {
get (key: string): string | null
};
Expand Down

0 comments on commit 372ca78

Please sign in to comment.