Skip to main content

Reference

Complete API documentation for DiCaf. For task-oriented guides, see the Guides section.

Core documents

The following documents cover the APIs you will use most often:

  • Container — the DiCaf class: constructor options, all resolution, binding, lifecycle, and inspection methods.

  • Binder — the Binder and BinderOptions fluent APIs returned by di.bind().

  • Decorators — every decorator exported from @caffeine-projects/dicaf/decorators, with signatures and examples.

  • Injection — the Injection type, InjectionDescriptor, and all injection helpers: allOf, optional, provide, mapped, object, defer, useValue, compose.

  • FactoriesFactory, AsyncFactory, and ResolutionContext.

  • InterceptorsPostResolutionInterceptor (per-binding) and PostProcessor (global).

Reference table of contents

  • BinderBinder<T> and BinderOptions<T> fluent APIs.

  • ContainerDiCaf constructor, resolution methods, binding methods, lifecycle, and properties.

  • Options — all DiCaf constructor options with types, defaults, and ScopeCheckMode values.

  • Decorators — all class, method, member, and configuration decorators.

  • Errors — all ErrXxx error classes with error codes and remediation guidance.

  • Factories — factory function types and resolution context.

  • Interceptors — per-binding and global instance interceptors.

  • Graph — five graph renderer functions: text, Markdown, Mermaid, DOT, and JSON.

  • HooksHookListener events emitted during container setup and runtime.

  • Injection — injection descriptor type and helper functions.

  • Scopes — built-in scope identifiers, the Scope interface, and the scope registry API for custom scopes.