From 0b61e26983c20b0a4facb50857133cde4a28555f Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 18 Oct 2019 18:05:09 +0100 Subject: [PATCH] Update RN typings for a shim (#17138) --- .../react-native/ReactNativeViewConfigRegistry.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/rollup/shims/react-native/ReactNativeViewConfigRegistry.js b/scripts/rollup/shims/react-native/ReactNativeViewConfigRegistry.js index 2173fc84b3e70..4653e2db9be48 100644 --- a/scripts/rollup/shims/react-native/ReactNativeViewConfigRegistry.js +++ b/scripts/rollup/shims/react-native/ReactNativeViewConfigRegistry.js @@ -20,8 +20,19 @@ import type { const invariant = require('invariant'); // Event configs -const customBubblingEventTypes = {}; -const customDirectEventTypes = {}; +const customBubblingEventTypes: { + [eventName: string]: $ReadOnly<{| + phasedRegistrationNames: $ReadOnly<{| + captured: string, + bubbled: string, + |}>, + |}>, +} = {}; +const customDirectEventTypes: { + [eventName: string]: $ReadOnly<{| + registrationName: string, + |}>, +} = {}; exports.customBubblingEventTypes = customBubblingEventTypes; exports.customDirectEventTypes = customDirectEventTypes;