From e87b0c3acbc5d94237968186bb512ad7b3dde7c7 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Sat, 23 Mar 2024 13:42:20 -0700 Subject: [PATCH] Fix some cyclic types Summary: X-link: https://github.com/facebook/react-native/pull/43630 Changelog: [Internal] Reviewed By: gkz Differential Revision: D55271602 fbshipit-source-id: cb93fae6231ade6e5865dd7e0756a12568dece12 --- .../src/crawlers/__tests__/integration-test.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/metro-file-map/src/crawlers/__tests__/integration-test.js b/packages/metro-file-map/src/crawlers/__tests__/integration-test.js index 8ab658b0a9..30cc8994fd 100644 --- a/packages/metro-file-map/src/crawlers/__tests__/integration-test.js +++ b/packages/metro-file-map/src/crawlers/__tests__/integration-test.js @@ -56,7 +56,16 @@ const FIXTURES_DIR = join(__dirname, '..', '__fixtures__'); // Crawlers may return the target for symlinks *if* they can do so efficiently, // (Watchman with symlink_target), but otherwise they should return 1 and // defer to the caller. This matcher helps with nested expectations. -declare var expect: {...expect, oneOf: () => {}}; +declare var expect: { + /** The object that you want to make assertions against */ + (value: mixed, description?: string): JestExpectType, + extend(matchers: {[name: string]: JestMatcher, ...}): void, + assertions(expectedAssertions: number): void, + any(value: mixed): JestAsymmetricEqualityType, + oneOf: (mixed, mixed) => boolean, + ... +}; + function oneOf(this: $FlowFixMe, actual: mixed, ...expectOneOf: mixed[]) { const pass = expectOneOf.includes(actual); return {