Skip to content

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Nov 3, 2024
1 parent b5d92c5 commit c2e2070
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"bumpp",
"Containerable",
"Fastly",
"inversify",
"Naily",
"nailyjs",
"paramtypes",
Expand Down
16 changes: 16 additions & 0 deletions packages/ioc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
* This is the core package of naily, which provides the basic IOC features. It is a lightweight、across-platform and easy-to-use IOC meta framework for TypeScript.
*
* @module
* @example
* ```typescript
* import { Container, Injectable, Inject } from '@nailyjs/ioc'
*
* Injectable()
* export class FooService {}
*
* Injectable()
* export class BarService {
* constructor(private fooService: FooService) {}
* }
*
* // No similar inversify.js, container will automatically inspect the dependencies of the constructors.
* const container = new Container()
* console.log(container.getContainer()) // It is a Map object, which contains all the registered services.
* ```
*/

export * from './apply-decorator'
Expand Down

0 comments on commit c2e2070

Please sign in to comment.