Skip to main content
Module

x/danet/mod.ts>Injector

The most mature backend framework for Deno
Go to Latest
class Injector
Re-export
import { Injector } from "https://deno.land/x/danet@1.8.0/mod.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>

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