From d5e7e3e61c7d3c86d72dd412a52561a13913ab69 Mon Sep 17 00:00:00 2001 From: Nedunchezhiyan-M Date: Wed, 8 Apr 2026 23:16:40 +0530 Subject: [PATCH] Fix FileReader.result type to include null The TypeScript declaration for FileReader.result is typed as string | ArrayBuffer, but the actual implementation returns null when no read operation has completed or when the read was aborted. This matches the WHATWG FileReader spec where result is null in the EMPTY and LOADING states. --- packages/react-native/src/types/globals.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/src/types/globals.d.ts b/packages/react-native/src/types/globals.d.ts index 4082da352804..aa95a1420b57 100644 --- a/packages/react-native/src/types/globals.d.ts +++ b/packages/react-native/src/types/globals.d.ts @@ -667,7 +667,7 @@ declare global { | ((this: FileReader, ev: ProgressEvent) => any) | null; readonly readyState: number; - readonly result: string | ArrayBuffer; + readonly result: string | ArrayBuffer | null; abort(): void; readAsArrayBuffer(blob: Blob): void; readAsDataURL(blob: Blob): void;