Upgrade Flow in fbsource (#58076)

Summary: Pull Request resolved: https://github.com/react/react-native/pull/58076

Reviewed By: SamChou19815

Differential Revision: D117077055

fbshipit-source-id: 63972e520cb3f4d3ec2a38ad42766073a9711d9a
This commit is contained in:
generatedunixname1026736676487289 authored and meta-codesync[bot] committed 2026-08-22 14:07:37 -07:00
1 parent 091ac613ce
commit 0c7f63a4e3
4 files changed
+4

No files matched your search

+1
View File
@@ -133,6 +133,7 @@ class FileReader extends EventTarget {
const base64 = text.split(',')[1];
const typedArray = toByteArray(base64);
// $FlowFixMe[incompatible-type]
this._result = typedArray.buffer;
this._setReadyState(DONE);
},
@@ -21,6 +21,7 @@ describe('binaryToBase64', () => {
it('should encode an ArrayBuffer', () => {
const bytes = new TextEncoder().encode('Test string');
// $FlowFixMe[incompatible-type]
expect(decodeBase64(binaryToBase64(bytes.buffer))).toEqual(
Array.from(bytes),
);
@@ -246,6 +246,7 @@ class WebSocket extends EventTarget {
let data: Blob | BlobData | ArrayBuffer | string = ev.data;
switch (ev.type) {
case 'binary':
// $FlowFixMe[incompatible-type]
data = base64.toByteArray(ev.data).buffer;
break;
case 'blob':
@@ -244,6 +244,7 @@ const WebSocketInterceptor = {
) {
return `ArrayBuffer {${String(Array.from(new Uint8Array(value)))}}`;
}
// $FlowFixMe[incompatible-type]
return value;
},