@sentium/injectable
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

@sentium/injectable

Modern Dependency Injection library for TypeScript using the new TC39 Decorators.

Features

  • Ultrafast & Lightweight
  • Multi-runtime
    • Works on Node.js, Deno, Bun or Cloudflare.
  • Sync or Async
    • Inject classes that are resolved asynchronously.
  • Type-safety
  • Injection scopes

Installation

Using npm, yarn, pnpm, bun

   # npm
   npm install @sentium/injectable

   # yarn
   yarn add @sentium/injectable

   # pnpm
   pnpm add @sentium/injectable

   # bun
   bun add @sentium/injectable

Using deno

import { ... } from "https://deno.land/x/sentium/injectable/mod.ts";

Usage

import { injectable, resolve } from "@sentium/injectable";

@injectable()
class MyClass {
  ...
}

const myInstance = resolve(MyClass);

Documentation

TODO

Readme

Keywords

none

Package Sidebar

Install

npm i @sentium/injectable

Weekly Downloads

0

Version

0.4.2

License

MIT

Unpacked Size

43.9 kB

Total Files

28

Last publish

Collaborators

  • lkwr