UNPKG

react-obsidian

Version:

Dependency injection framework for React and React Native applications

32 lines 1.35 kB
import { Constructable } from '../../types'; import { Graph } from '../Graph'; import { Middleware } from './Middleware'; export declare class GraphRegistry { private readonly constructorToInstance; private readonly instanceToConstructor; private readonly injectionTokenToInstance; private readonly instanceToInjectionToken; private readonly nameToInstance; private readonly graphToSubgraphs; private readonly graphMiddlewares; register(constructor: Constructable<Graph>, subgraphs?: Constructable<Graph>[]): void; ensureRegistered(graph: Graph): void; getSubgraphs(graph: Graph): Graph[]; getGraphInstance(name: string): Graph; resolve<T extends Graph>(Graph: Constructable<T>, source?: 'lifecycleOwner' | 'classInjection' | 'serviceLocator', props?: any, injectionToken?: string): T; private has; private getFirst; private getByInjectionToken; private set; private isSingleton; private isBoundToReactLifecycle; private isComponentScopedLifecycleBound; clearGraphAfterItWasMockedInTests(graphName: string): void; clear(graph: Graph): void; addGraphMiddleware(middleware: Middleware<Graph>): void; clearGraphMiddlewares(): void; clearAll(): void; } declare const _default: GraphRegistry; export default _default; //# sourceMappingURL=GraphRegistry.d.ts.map