Skip to main content
This release is 2 versions behind 0.2.1 — the latest version of @findhow/container. Jump to latest

Built and signed on GitHub Actions

Wasn't a fan of using decorators to dependency inject things in the TypeScript world. Now you don't have to.

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
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
It is unknown whether this package works with Browsers
JSR Score
100%
Published
a week ago (0.1.0)
T
AnyFunction
No documentation available
T
Bindable
No documentation available
T
Constructor
No documentation available
c
Container
No documentation available
c
DIContainer

Dependency Injection Container

c
Container

The Container class implements the LaravelContainer interface and providesa dependency injection container for managing class dependencies and performingdependency injection.

I
ContextualBindingBuilder

Interface for defining contextual bindings in the container.This allows you to define what a concrete type should be given when a specific abstract type is needed.

I
LaravelContainer

Interface representing a Laravel-style container.

c
DIContainer

Dependency Injection Container

c
Observer

Observer

c
CircularDependencyError

Error thrown when a circular dependency is detected.This error indicates that the dependency resolution process has encountered a loop.

E
ContainerErrorType

Enum representing the different types of errors that can occur within the container.Each error type corresponds to a specific issue that may arise during dependency resolution.

c
InvalidAliasError

Error thrown when an alias is resolved that does not exist.This error indicates that the specified alias has not been created in the container.

c
InvalidContextualBindingError

Error thrown when a contextual binding is invalid or undefined.This error indicates that the specified service or dependency is not properly defined.

c
InvalidExtensionError

Error thrown when an attempt is made to extend a binding that does not exist.This error indicates that the specified type has not been registered in the container.

c
InvalidSchemaError

Error thrown when a resolved instance does not match the Zod schema.This error indicates that the validation against the schema has failed.

c
InvalidTagError

Error thrown when a tag is resolved that has no associated bindings.This error indicates that the specified tag has not been used to tag any bindings in the container.

c
InvalidTypeError

Error thrown when the resolved value does not match the expected type.This error provides details about the expected and received types.

c
UnresolvedDependencyError

Error thrown when a dependency cannot be resolved because it has not been bound.This error indicates that the specified type has not been registered in the container.