From e19bf4c572ebe2849cd54ee22c1565cf2ef69a22 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Mon, 10 Mar 2025 14:33:23 -0700 Subject: [PATCH] Align internal and external definition of `describe` function from jest Summary: The typing of internal version of jest and the libdef in react-native has diverged a bit. This diff aligns the typing for `describe` Changelog: [Internal] Reviewed By: gkz Differential Revision: D70917375 --- packages/react-native/flow/jest.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-native/flow/jest.js b/packages/react-native/flow/jest.js index 5841fe0e5aff..fe6ae3cfd82b 100644 --- a/packages/react-native/flow/jest.js +++ b/packages/react-native/flow/jest.js @@ -1040,10 +1040,12 @@ declare var describe: { * @param {table} table of Test */ each( - ...table: Array | mixed> | [Array, string] + ...table: + | $ReadOnlyArray<$ReadOnlyArray | mixed> + | [$ReadOnlyArray, string] ): ( name: JestTestName, - fn?: (...args: Array) => ?Promise, + fn?: (...args: $ReadOnlyArray) => ?Promise, timeout?: number, ) => void, ...