Skip to content

Fixed type of event parameter in FileReader callbacks #32414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions lib/lib.dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5233,12 +5233,12 @@ interface FileReaderEventMap {
/** The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
interface FileReader extends EventTarget {
readonly error: DOMException | null;
onabort: ((this: FileReader, ev: ProgressEvent) => any) | null;
onerror: ((this: FileReader, ev: ProgressEvent) => any) | null;
onload: ((this: FileReader, ev: ProgressEvent) => any) | null;
onloadend: ((this: FileReader, ev: ProgressEvent) => any) | null;
onloadstart: ((this: FileReader, ev: ProgressEvent) => any) | null;
onprogress: ((this: FileReader, ev: ProgressEvent) => any) | null;
onabort: ((this: FileReader, ev: FileReaderProgressEvent) => any) | null;
onerror: ((this: FileReader, ev: FileReaderProgressEvent) => any) | null;
onload: ((this: FileReader, ev: FileReaderProgressEvent) => any) | null;
onloadend: ((this: FileReader, ev: FileReaderProgressEvent) => any) | null;
onloadstart: ((this: FileReader, ev: FileReaderProgressEvent) => any) | null;
onprogress: ((this: FileReader, ev: FileReaderProgressEvent) => any) | null;
readonly readyState: number;
readonly result: string | ArrayBuffer | null;
abort(): void;
Expand All @@ -5263,6 +5263,10 @@ declare var FileReader: {
readonly LOADING: number;
};

interface FileReaderProgressEvent extends ProgressEvent {
readonly target: FileReader | null;
}

/** The FocusEvent interface represents focus-related events like focus, blur, focusin, or focusout. */
interface FocusEvent extends UIEvent {
readonly relatedTarget: EventTarget;
Expand Down