Skip to main content

A dependency injection nano container

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (0.6.3)
type alias AssertValidContainer

Given a Container, asserts that It can provide the shape required by Deps. When the assertion can't be satisfied, returns never to block usage.

Type Parameters

Container
Deps

Definition

Container extends Deps ? Container : never

Add Package

deno add jsr:@esroyo/bottlexs

Import symbol

import { type AssertValidContainer } from "@esroyo/bottlexs";

---- OR ----

Import directly with a jsr specifier

import { type AssertValidContainer } from "jsr:@esroyo/bottlexs";

Add Package

npx jsr add @esroyo/bottlexs

Import symbol

import { type AssertValidContainer } from "@esroyo/bottlexs";

Add Package

yarn dlx jsr add @esroyo/bottlexs

Import symbol

import { type AssertValidContainer } from "@esroyo/bottlexs";

Add Package

pnpm dlx jsr add @esroyo/bottlexs

Import symbol

import { type AssertValidContainer } from "@esroyo/bottlexs";

Add Package

bunx jsr add @esroyo/bottlexs

Import symbol

import { type AssertValidContainer } from "@esroyo/bottlexs";