Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/lib/di/registry.ts>Container

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
interface Container
Re-export
import { type Container } from "https://deno.land/x/hex@0.6.5/src/lib/di/registry.ts";

Type Parameters

optional
K = Class | symbol | string
optional
V = any

Properties

items: ContainerItems<K, V>

Methods

get<V2 = V>(token: K, defaultValue?: V2): Promise<V2 | undefined> | V2 | undefined
getMany<K2 extends string | number | symbol>(...tokens: K2[]): Promise<Record<K2, V | undefined>> | Record<K2, V | undefined>
setValue(token: K, value: V): void
setValueLazy(token: K, value: () => V | undefined): void
setFactory(token: K, value: () => V | undefined): void