Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adonisjs/ioc-transformer

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/ioc-transformer

Typescript transformer to transform import statements to IoC container use calls

  • 2.1.0
  • next
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.8K
decreased by-4.18%
Maintainers
2
Weekly downloads
 
Created
Source

Ioc Transformer

Typescript transformer to transform import statements to IoC container use calls

npm-image license-image

The Ioc container of AdonisJs exposes the use method to resolve dependencies from the container. However, using use and import statements together feels a bit cluttered. This module enables using import statements for IoC container bindings and transforms them to the use call by hooking into the Typescript compiler lifecycle.

Table of contents

  • Usage

Usage

Install the package from npm registry as follows:

npm i @adonisjs/ioc-transformer

Pass it to the Typescript compiler as after hook. Following is an example of using it with ts-node.

const { iocTransformer } = require('@adonisjs/ioc-transformer')

require('ts-node').register({
  transformers: {
    after: [iocTransformer(require('typescript/lib/typescript'), require('./.adonisrc.json'))],
  }
})

Keywords

FAQs

Package last updated on 06 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc