UNPKG

react-obsidian

Version:

Dependency injection framework for React and React Native applications

9 lines (7 loc) 359 B
import { Constructable } from '../../types'; import { Graph } from '../../graph/Graph'; import graphRegistry from '../../graph/registry/GraphRegistry'; import ClassInjector from '../../injectors/class/ClassInjector'; export function injectable(keyOrGraph: string | Constructable<Graph>): any { return new ClassInjector(graphRegistry).inject(keyOrGraph); }