3.0.1 • Published 3 years ago

@denarius/accio v3.0.1

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

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

3.0.1

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago