-
Notifications
You must be signed in to change notification settings - Fork 724
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93ef0c7
commit bec7fa1
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,15 +51,21 @@ InversifyJS has been developed with 4 main goals: | |
|
||
You can get the latest release and the type definitions using npm: | ||
```sh | ||
npm install [email protected].4 --save | ||
npm install [email protected].5 inversify-dts reflect-metadata --save | ||
``` | ||
> **Note**: We have decided to [drop support for bower](https://twitter.com/nachocoloma/status/663622545162280960) and tsd. | ||
|
||
The InversifyJS type definitions are included in the npm package: | ||
The InversifyJS type definitions are included in the inversify-dts npm package: | ||
|
||
```ts | ||
/// <reference path="node_modules/inversify/type_definitions/inversify/inversify.d.ts" /> | ||
/// <reference path="node_modules/inversify-dts/inversify/inversify.d.ts" /> | ||
``` | ||
|
||
The reflect-metadata type definitions are included in the npm package: | ||
|
||
```ts | ||
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts" /> | ||
``` | ||
|
||
> **Note**: InversifyJS requires a modern JavaScript engine with support for the Promise, Reflect (with metadata) and Proxy objects. | ||
If your environment don't support one of these you will need to import a shim or polyfill. Check out the | ||
[Environment support and polyfills](https://github.com/inversify/InversifyJS/blob/master/wiki/environment.md) page in the wiki to learn more. | ||
|
@@ -107,6 +113,7 @@ When a class has a dependency on an interface we also need to use the `@inject` | |
```ts | ||
import { injectable, inject } from "inversify"; | ||
import "reflect-metadata"; | ||
|
||
@injectable() | ||
class Katana implements IKatana { | ||
|