@tshio/awilix-resolver
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

Awilix Resolver

npm version

Non-blocking Awilix Resolver library for Node.js.

This is a 100% JavaScript library, with TypeScript definition, with the Promise API.

Awilix version required 4.3.1 or above

Installing

$ npm install @tshio/awilix-resolver
$ npm install awilix

or

$ yarn add @tshio/awilix-resolver
$ yarn add awilix

Usage

// CommonJS
const { asArray } = require("@tshio/awilix-resolver");

// ES Module
import { asArray } from "@tshio/awilix-resolver";

import * as awilix from "awilix";

// SUBSCRIBERS_IMPORTS
import ExampleSubscriber from "example-subscriber";


export async function registerSubscribers(container: AwilixContainer) {
  container.register({
    eventSubscribers: asArray<any>([
      // SUBSCRIBERS_SETUP
      awilix.asClass(ExampleSubscriber).singleton(),
    ]),
  });

  return container;
}

License

license

This project is licensed under the terms of the MIT license.

About us:

The Software House

tsh.png

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i @tshio/awilix-resolver

    Weekly Downloads

    54

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    6.96 kB

    Total Files

    9

    Last publish

    Collaborators

    • vviktor
    • aherok
    • sethii
    • barograf