---
id: fast-foundation.di
title: DI variable
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-foundation](./fast-foundation.md) &gt; [DI](./fast-foundation.di.md)

## DI variable

The gateway to dependency injection APIs.

<b>Signature:</b>

```typescript
DI: Readonly<{
    createContainer(config?: Partial<ContainerConfiguration> | undefined): Container;
    findResponsibleContainer(node: Node): Container;
    findParentContainer(node: Node): Container;
    getOrCreateDOMContainer(node?: Node | undefined, config?: Partial<Omit<ContainerConfiguration, "parentLocator">> | undefined): Container;
    getDesignParamtypes: (Type: Constructable | Injectable) => readonly Key[] | undefined;
    getAnnotationParamtypes: (Type: Constructable | Injectable) => readonly Key[] | undefined;
    getOrCreateAnnotationParamTypes(Type: Constructable | Injectable): Key[];
    getDependencies(Type: Constructable | Injectable): Key[];
    defineProperty(target: {}, propertyName: string, key: Key, respectConnection?: boolean): void;
    createInterface<K extends Key>(nameConfigOrCallback?: string | InterfaceConfiguration | ((builder: ResolverBuilder<K>) => Resolver<K>) | undefined, configuror?: ((builder: ResolverBuilder<K>) => Resolver<K>) | undefined): InterfaceSymbol<K>;
    inject(...dependencies: Key[]): (target: any, key?: string | number | undefined, descriptor?: number | PropertyDescriptor | undefined) => 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>;
}>
```