Skip to content

Commit

Permalink
Add annotations to ReactNativePrivateInterface
Browse files Browse the repository at this point in the history
Reviewed By: panagosg7

Differential Revision: D16946424

fbshipit-source-id: 90f13dd8bb25aac7ed8b2bebe6d7e49fa97958ff
  • Loading branch information
logandaniels authored and facebook-github-bot committed Aug 23, 2019
1 parent cafbf67 commit 08daad4
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions Libraries/ReactPrivate/ReactNativePrivateInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,54 @@
* @flow strict-local
*/

import typeof BatchedBridge from '../BatchedBridge/BatchedBridge.js';
import typeof ExceptionsManager from '../Core/ExceptionsManager';
import typeof Platform from '../Utilities/Platform';
import typeof RCTEventEmitter from '../EventEmitter/RCTEventEmitter';
import typeof ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';
import typeof TextInputState from '../Components/TextInput/TextInputState';
import typeof UIManager from '../ReactNative/UIManager';
import typeof deepDiffer from '../Utilities/differ/deepDiffer';
import typeof deepFreezeAndThrowOnMutationInDev from '../Utilities/deepFreezeAndThrowOnMutationInDev';
import typeof flattenStyle from '../StyleSheet/flattenStyle';
import typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog';

// flowlint unsafe-getters-setters:off
module.exports = {
get BatchedBridge() {
get BatchedBridge(): BatchedBridge {
return require('../BatchedBridge/BatchedBridge.js');
},
get ExceptionsManager() {
get ExceptionsManager(): ExceptionsManager {
return require('../Core/ExceptionsManager');
},
get Platform() {
get Platform(): Platform {
return require('../Utilities/Platform');
},
get RCTEventEmitter() {
get RCTEventEmitter(): RCTEventEmitter {
return require('../EventEmitter/RCTEventEmitter');
},
get ReactNativeViewConfigRegistry() {
get ReactNativeViewConfigRegistry(): ReactNativeViewConfigRegistry {
return require('../Renderer/shims/ReactNativeViewConfigRegistry');
},
get TextInputState() {
get TextInputState(): TextInputState {
return require('../Components/TextInput/TextInputState');
},
get UIManager() {
get UIManager(): UIManager {
return require('../ReactNative/UIManager');
},
get deepDiffer() {
get deepDiffer(): deepDiffer {
return require('../Utilities/differ/deepDiffer');
},
get deepFreezeAndThrowOnMutationInDev() {
get deepFreezeAndThrowOnMutationInDev(): deepFreezeAndThrowOnMutationInDev<
// $FlowFixMe - can't properly parameterize the getter's type
*,
> {
return require('../Utilities/deepFreezeAndThrowOnMutationInDev');
},
get flattenStyle() {
get flattenStyle(): flattenStyle {
return require('../StyleSheet/flattenStyle');
},
get ReactFiberErrorDialog() {
get ReactFiberErrorDialog(): ReactFiberErrorDialog {
return require('../Core/ReactFiberErrorDialog');
},
};

0 comments on commit 08daad4

Please sign in to comment.