DI variable
@microsoft/fast-element/di.js > DI
DI variable
The gateway to dependency injection APIs.
Signature:
DI: Readonly<{
installAsContextRequestStrategy(fallback?: () => DOMContainer): void;
createContainer(config?: Partial<ContainerConfiguration>): Container;
findResponsibleContainer(target: EventTarget, fallback?: () => DOMContainer): DOMContainer;
findParentContainer(target: EventTarget, fallback?: () => DOMContainer): DOMContainer;
getOrCreateDOMContainer(target?: EventTarget, config?: Partial<Omit<ContainerConfiguration, "parentLocator">>): DOMContainer;
getDependencies(Type: Constructable | Injectable): Key[];
defineProperty(target: {}, propertyName: string, key: Key, respectConnection?: boolean): void;
createContext: typeof createContext;
inject(...dependencies: Key[]): (target: any, key?: string | number, descriptor?: PropertyDescriptor | number) => void;
transient<T extends Constructable<{}>>(target: T & Partial<RegisterSelf<T>>): T & RegisterSelf<T>;
singleton<T_1 extends Constructable<{}>>(target: T_1 & Partial<RegisterSelf<T_1>>, options?: SingletonOptions): T_1 & RegisterSelf<T_1>;
}>