From 2a01eadcb83ab81e193d73753df39baaf9035938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Thu, 17 Jul 2025 08:35:36 -0700 Subject: [PATCH] Remove unnecessary $FlowFixMe after correct typing for console.timeStamp (#52633) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52633 Changelog: [internal] Now that we have the correct type definition for `console.timeStamp` we can remove the unnecessary `$FlowFixMe` annotations we had to add to use the new arguments. Reviewed By: hoxyq Differential Revision: D78405312 fbshipit-source-id: 29378ee6fa5986e22d0dfdfb85b7e25375361dc9 --- packages/polyfills/__tests__/consoleTimeStamp-itest.js | 2 -- packages/react-native/Libraries/Network/XMLHttpRequest.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/polyfills/__tests__/consoleTimeStamp-itest.js b/packages/polyfills/__tests__/consoleTimeStamp-itest.js index 2d58779f1e5..f7ada6406f6 100644 --- a/packages/polyfills/__tests__/consoleTimeStamp-itest.js +++ b/packages/polyfills/__tests__/consoleTimeStamp-itest.js @@ -26,7 +26,6 @@ describe('console.timeStamp()', () => { it("doesn't throw when additional arguments are specified", () => { expect(() => - // $FlowExpectedError[extra-arg] console.timeStamp('label', 100, 500, 'Track', 'Group', 'error'), ).not.toThrow(); }); @@ -35,7 +34,6 @@ describe('console.timeStamp()', () => { // $FlowExpectedError[incompatible-call] expect(() => console.timeStamp({})).not.toThrow(); expect(() => - // $FlowExpectedError[extra-arg] // $FlowExpectedError[incompatible-call] console.timeStamp('label', true, null, {}, [], () => {}), ).not.toThrow(); diff --git a/packages/react-native/Libraries/Network/XMLHttpRequest.js b/packages/react-native/Libraries/Network/XMLHttpRequest.js index 886fd16d0d6..96bf736437f 100644 --- a/packages/react-native/Libraries/Network/XMLHttpRequest.js +++ b/packages/react-native/Libraries/Network/XMLHttpRequest.js @@ -400,7 +400,6 @@ class XMLHttpRequest extends EventTarget { if (XMLHttpRequest._profiling) { console.timeStamp( 'Incremental Data: ' + this._getMeasureURL(), - // $FlowFixMe[extra-arg] Add correct typing for `console.timeStamp` start, undefined, PERFORMANCE_TRACK_NAME, @@ -455,7 +454,6 @@ class XMLHttpRequest extends EventTarget { const start = this._startTime; console.timeStamp( this._getMeasureURL(), - // $FlowFixMe[extra-arg] Add correct typing for `console.timeStamp` start, undefined, PERFORMANCE_TRACK_NAME,