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

x/danet/src/injector/injector.ts>Injector

The most mature backend framework for Deno. Create awesome HTTP and WebSocket server as well as KVQueue workers !
Go to Latest
class Injector
import { Injector } from "https://deno.land/x/danet@2.4.0/src/injector/injector.ts";

Properties

private
availableTypes: Map<Constructor | string, Constructor>
private
contextInjectables: Map<string, Map<Constructor | string, unknown>>
private
logger: Logger
private
resolved: Map<Constructor | string, (ctx?: ExecutionContext) => Promise<unknown> | unknown>
private
resolvedTypes: Map<Constructor | string, Constructor>
controllers: Array<any>
injectables: Array<any>
modules: Array<any>

Methods

private
getParamToken(Type: Constructor, paramIndex: number)
private
resolveDependencies(Dependencies: Constructor[], ParentConstructor: Constructor)
private
resolveInjectable(
ParentConstructor?: Constructor,
token?: string,
)
private
setNonSingleton(
key: string | InjectableConstructor,
dependencies: Array<Constructor>,
transient?: boolean,
)
get<T>(Type: Constructor<T> | string, ctx?: ExecutionContext): T
has<T>(Type: Constructor<T> | string): boolean