From f45329221ae7bace8bc21ef4ad8b8a598eb91e5f Mon Sep 17 00:00:00 2001 From: Pieter Vanderwerff Date: Mon, 14 Nov 2022 10:41:58 -0800 Subject: [PATCH] Fix and enforce empty array providers in xplat/js Reviewed By: bradzacher Differential Revision: D41207298 fbshipit-source-id: cd25a3edbb8bb94fd18434c9cee16f9c36f9b74a --- .flowconfig | 1 + .flowconfig.android | 1 + .../src/parsers/__tests__/error-utils-test.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.flowconfig b/.flowconfig index 31876f8dbb3c4f..dbf1c3159a8297 100644 --- a/.flowconfig +++ b/.flowconfig @@ -51,6 +51,7 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FlowFixMeEmpty +experimental.array_literal_providers=true inference_mode=constrain_writes [lints] diff --git a/.flowconfig.android b/.flowconfig.android index cdfe915be1ac8e..bd1f74ee40d813 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -51,6 +51,7 @@ suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState suppress_type=$FlowFixMeEmpty +experimental.array_literal_providers=true inference_mode=constrain_writes [lints] diff --git a/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js b/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js index d5d2447bee91e2..ad40475d417a80 100644 --- a/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js +++ b/packages/react-native-codegen/src/parsers/__tests__/error-utils-test.js @@ -595,7 +595,7 @@ describe('throwIfModuleTypeIsUnsupported', () => { describe('throwIfMoreThanOneModuleInterfaceParserError', () => { it("don't throw error if module specs length is <= 1", () => { const nativeModuleName = 'moduleName'; - const moduleSpecs = []; + const moduleSpecs: $ReadOnlyArray<$FlowFixMe> = []; const parserType = 'Flow'; expect(() => {