0.0.4 • Published 2 years ago

@bjorkhaug/sdi v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Simple Service Dependency Injection for Deno and Node.js

This module provides a simple service dependency injection system for Deno and Node.js applications.

import { Container, Service } from '@bjorkhaug/sdi'

@Service()
class ServiceA {
  // Your service code here
}

@Service()
class ServiceB {
  constructor(private readonly a: ServiceA) {}
  // Your service code here
}

const myServiceInstance = Container.get(ServiceB)

Note that the typescript compiler must emit metadata for this to work as we rely on typescript metadata features.

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago