3.0.1 • Published 3 years ago
@denarius/accio v3.0.1
The Summoning Charm used in NodeJS!
Also a dependency injection lib that use Typescript.
Install
yarn add reflect-metadata @denarius/accio
Quick Start
your index.ts file:
import { Injectable, MainApplication, boost } from "@denarius/accio";
@Injectable()
export class TheElderWand {
wave() {
console.log("boomb!!");
}
}
@MainApplication()
export class Wizard {
constructor(private wand: TheElderWand) {}
@boost()
use() {
this.wand.wave();
}
}
your tsconfig.json file:
{
"compilerOptions": {
"target": "ES2015",
"emitDecoratorMetadata": true,
"experimentalDecorators": true
}
}
run ts-node index.js
then you will get boomb!!
in your terminal!
Document
work in progress :p