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

x/hex/src/lib/mod.ts>di.containers.Container

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

Type Parameters

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

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