egg-typed-di
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

egg-typed-di

Quick overview

Service

import { Service, serviceMetadata, Context } from 'egg-typed';
 
@context()
export class TestService extends Service {
  get(id: string | number) {
    return {
      id,
      name: this.app.config.test + '_' + id,
    };
  }
}
 
export class Controller {
  private testService: TestService;
  
}

Readme

Keywords

Package Sidebar

Install

npm i egg-typed-di

Weekly Downloads

0

Version

0.2.4

License

MIT

Unpacked Size

10.8 kB

Total Files

18

Last publish

Collaborators

  • zhang740