Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/src/injection/index.ts>InternalDependencyContainer

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
class InternalDependencyContainer
import { InternalDependencyContainer } from "https://deno.land/x/alosaur@v0.24.1/src/injection/index.ts";

Dependency Container

Constructors

new
InternalDependencyContainer(parent?: InternalDependencyContainer)

Properties

private
_registry: Registry

Methods

private
construct<T>(ctor: constructor<T> | DelayedConstructor<T>, context: ResolutionContext): T
private
getAllRegistrations<T>(token: InjectionToken<T>): Registration[] | null
private
getRegistration<T>(token: InjectionToken<T>): Registration | null
private
resolveParams<T>(context: ResolutionContext, ctor: constructor<T>)
private
resolveRegistration<T>(registration: Registration, context: ResolutionContext): T
isRegistered<T>(token: InjectionToken<T>, recursive?): boolean

Register a dependency provider.

register<T>(
token: InjectionToken<T>,
provider: constructor<T>,
): InternalDependencyContainer
registerSingleton<T>(token: constructor<T>, to?: constructor<any>): InternalDependencyContainer
reset(): void
resolve<T>(token: InjectionToken<T>, context?: ResolutionContext): T
resolveAll<T>(token: InjectionToken<T>, context?: ResolutionContext): T[]