From 08d3af994adb5788042d11f8f88b6bc4e9edd405 Mon Sep 17 00:00:00 2001 From: George Zahariev Date: Wed, 6 Apr 2022 12:42:22 -0700 Subject: [PATCH] Run codemod removing annotations nested inside of destructuring Summary: Annotations inside of destructuring (e.g. `const [foo: number] = ...`) are invalid Flow syntax. We currently ignore them, and in the future will error on them (D35304565). Remove them using the codemod from D35390352 Locally changed WWW_ROOT, FLOW_ROOTS, and excluded paths in scripts/typedjs/flow/runner.config.js (e.g. P492224584) - and then ``` scripts/typedjs/flow/runner codemod removeAnnotationsInDestructuring ~/fbsource/xplat/js ``` formatting files didn't work, so do it manually Changelog: [Internal] drop-conflicts Reviewed By: fred2028 Differential Revision: D35419146 fbshipit-source-id: e4c05506ceec11afcc8e92f13f732510ebabdbc3 --- Libraries/Utilities/HMRClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Utilities/HMRClient.js b/Libraries/Utilities/HMRClient.js index 253f9627171..63da957ef37 100644 --- a/Libraries/Utilities/HMRClient.js +++ b/Libraries/Utilities/HMRClient.js @@ -292,7 +292,7 @@ function registerBundleEntryPoints(client) { function flushEarlyLogs(client) { try { - pendingLogs.forEach(([level: LogLevel, data: Array]) => { + pendingLogs.forEach(([level, data]) => { HMRClient.log(level, data); }); } finally {