-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
370f27d
commit b56ca16
Showing
2 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
declare type BlobPart = BufferSource | Blob | String; | ||
|
||
declare type EndingType = "transparent" | "native"; | ||
|
||
declare interface BlobOptions { | ||
type?: string, | ||
endings?: EndingType, | ||
} | ||
|
||
declare class Blob { | ||
constructor(blobParts?: BlobPart[], options?: BlobOptions): Blob; | ||
|
||
get size(): number; | ||
|
||
get type(): string; | ||
|
||
slice(start?: number, end?: number, type?: string): Blob; | ||
|
||
text(): Promise<string>; | ||
|
||
arrayBuffer(): Promise<ArrayBuffer>; | ||
} | ||
|
||
declare interface FileOptions extends BlobOptions { | ||
lastModified?: number, | ||
} | ||
|
||
declare class File extends Blob { | ||
constructor(blobParts?: BlobPart[], options?: FileOptions): File; | ||
|
||
get name(): string; | ||
|
||
get lastModified(): number; | ||
} | ||
|
||
declare class FileReader { | ||
constructor(): FileReader; | ||
|
||
static EMPTY: number; | ||
static LOADING: number; | ||
static DONE: number; | ||
|
||
get readyState(): number; | ||
|
||
get result(): string | ArrayBuffer | null; | ||
|
||
get error(): Error | null; | ||
|
||
readAsArrayBuffer(blob: Blob): void; | ||
|
||
readAsBinaryString(blob: Blob): void; | ||
|
||
readAsText(blob: Blob, encoding?: string): void; | ||
|
||
readAsDataURL(blob: Blob): void; | ||
} | ||
|
||
|
||
declare class FileReaderSync { | ||
constructor(): FileReaderSync; | ||
|
||
readAsArrayBuffer(blob: Blob): ArrayBuffer; | ||
|
||
readAsBinaryString(blob: Blob): string; | ||
|
||
readAsText(blob: Blob, encoding?: string): string; | ||
|
||
readAsDataURL(blob: Blob): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
declare type BlobPart = BufferSource | Blob | String; | ||
|
||
declare type EndingType = "transparent" | "native"; | ||
|
||
declare interface BlobOptions { | ||
type?: string, | ||
endings?: EndingType, | ||
} | ||
|
||
declare class Blob { | ||
constructor(blobParts?: BlobPart[], options?: BlobOptions); | ||
|
||
get size(): number; | ||
|
||
get type(): string; | ||
|
||
slice(start?: number, end?: number, type?: string): Blob; | ||
|
||
text(): Promise<string>; | ||
|
||
arrayBuffer(): Promise<ArrayBuffer>; | ||
} | ||
|
||
declare interface FileOptions extends BlobOptions { | ||
lastModified?: number, | ||
} | ||
|
||
declare class File extends Blob { | ||
constructor(blobParts?: BlobPart[], options?: FileOptions); | ||
|
||
get name(): string; | ||
|
||
get lastModified(): number; | ||
} | ||
|
||
declare class FileReader { | ||
static EMPTY: number; | ||
static LOADING: number; | ||
static DONE: number; | ||
|
||
constructor(); | ||
|
||
get readyState(): number; | ||
|
||
get result(): string | ArrayBuffer | null; | ||
|
||
get error(): Error | null; | ||
|
||
readAsArrayBuffer(blob: Blob): void; | ||
|
||
readAsBinaryString(blob: Blob): void; | ||
|
||
readAsText(blob: Blob, encoding?: string): void; | ||
|
||
readAsDataURL(blob: Blob): void; | ||
} | ||
|
||
|
||
declare class FileReaderSync { | ||
constructor(); | ||
|
||
readAsArrayBuffer(blob: Blob): ArrayBuffer; | ||
|
||
readAsBinaryString(blob: Blob): string; | ||
|
||
readAsText(blob: Blob, encoding?: string): string; | ||
|
||
readAsDataURL(blob: Blob): string; | ||
} |