import { Context } from 'react'; import { ReactModule, ReactModuleProps } from './module'; /** * Type definition for the react component for a module */ export declare type ReactModuleType = ReactModule; /** * Declares a react provider. The provider declares the provided * context and its dependencies. * * Refer to https://reactjs.org/docs/context.html */ export interface ReactProvider { /** * React component that implements the provider. The component * consumes the dependencies and the optional dependencies * and provides the specified context. */ module: ReactModuleType; /** * Provided context */ provides: Context; /** * Required contexts, will be consumed when the module gets instantiated */ dependencies?: Context[]; /** * optional contexts */ optionalDependencies?: Context[]; } /** * Constructs an instance of a provider * * @param module - the module * @param provides - the context the module provides * @param dependencies - dependencies * @param optionalDependencies - optional dependencies * * @returns the provider instance */ export declare function createReactProvider(module: ReactModuleType, provides: Context, dependencies?: Context[], optionalDependencies?: Context[]): ReactProvider; /** * Constructs a module component that includes the referenced * providers in topological order * * @param aProviders - the set of providers * @returns the component */ export declare const createModuleFromProvider: (aProviders: ReactProvider[]) => import("../public_api").ReactComponent;