mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
5e07347948
Summary: Changelog: [JS] Style: Improve flow typing for UIManagerInjection for static view configs Reviewed By: yungsters Differential Revision: D33522890 fbshipit-source-id: 4b0d4da4932473e2316abf25b00896c33f285b63
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
import type {Spec} from './NativeUIManager';
|
|
import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';
|
|
|
|
export interface UIManagerJSInterface extends Spec {
|
|
+getViewManagerConfig: (viewManagerName: string) => Object;
|
|
+hasViewManagerConfig: (viewManagerName: string) => boolean;
|
|
+createView: (
|
|
reactTag: ?number,
|
|
viewName: string,
|
|
rootTag: RootTag,
|
|
props: Object,
|
|
) => void;
|
|
+updateView: (reactTag: number, viewName: string, props: Object) => void;
|
|
+manageChildren: (
|
|
containerTag: ?number,
|
|
moveFromIndices: Array<number>,
|
|
moveToIndices: Array<number>,
|
|
addChildReactTags: Array<number>,
|
|
addAtIndices: Array<number>,
|
|
removeAtIndices: Array<number>,
|
|
) => void;
|
|
}
|
|
|
|
const UIManager: UIManagerJSInterface =
|
|
global.RN$Bridgeless === true
|
|
? require('./DummyUIManager')
|
|
: require('./UIManagerInjection').default.unstable_UIManager ??
|
|
require('./PaperUIManager');
|
|
|
|
module.exports = UIManager;
|