1 | /// <reference types="node" />
|
---|
2 |
|
---|
3 | import { Blob } from 'buffer'
|
---|
4 | import { DOMException, EventInit } from './patch'
|
---|
5 |
|
---|
6 | export declare class FileReader {
|
---|
7 | __proto__: EventTarget & FileReader
|
---|
8 |
|
---|
9 | constructor ()
|
---|
10 |
|
---|
11 | readAsArrayBuffer (blob: Blob): void
|
---|
12 | readAsBinaryString (blob: Blob): void
|
---|
13 | readAsText (blob: Blob, encoding?: string): void
|
---|
14 | readAsDataURL (blob: Blob): void
|
---|
15 |
|
---|
16 | abort (): void
|
---|
17 |
|
---|
18 | static readonly EMPTY = 0
|
---|
19 | static readonly LOADING = 1
|
---|
20 | static readonly DONE = 2
|
---|
21 |
|
---|
22 | readonly EMPTY = 0
|
---|
23 | readonly LOADING = 1
|
---|
24 | readonly DONE = 2
|
---|
25 |
|
---|
26 | readonly readyState: number
|
---|
27 |
|
---|
28 | readonly result: string | ArrayBuffer | null
|
---|
29 |
|
---|
30 | readonly error: DOMException | null
|
---|
31 |
|
---|
32 | onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
|
---|
33 | onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
|
---|
34 | onload: null | ((this: FileReader, event: ProgressEvent) => void)
|
---|
35 | onabort: null | ((this: FileReader, event: ProgressEvent) => void)
|
---|
36 | onerror: null | ((this: FileReader, event: ProgressEvent) => void)
|
---|
37 | onloadend: null | ((this: FileReader, event: ProgressEvent) => void)
|
---|
38 | }
|
---|
39 |
|
---|
40 | export interface ProgressEventInit extends EventInit {
|
---|
41 | lengthComputable?: boolean
|
---|
42 | loaded?: number
|
---|
43 | total?: number
|
---|
44 | }
|
---|
45 |
|
---|
46 | export declare class ProgressEvent {
|
---|
47 | __proto__: Event & ProgressEvent
|
---|
48 |
|
---|
49 | constructor (type: string, eventInitDict?: ProgressEventInit)
|
---|
50 |
|
---|
51 | readonly lengthComputable: boolean
|
---|
52 | readonly loaded: number
|
---|
53 | readonly total: number
|
---|
54 | }
|
---|