Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dcavanagh committed Aug 24, 2019
2 parents 592ad43 + 57df711 commit 3fe39e7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ When a class has a dependency on an interface we also need to use the `@inject`

import { injectable, inject } from "inversify";
import "reflect-metadata";
import { Weapon, ThrowableWeapon, Warrior } from "./interfaces"
import { Weapon, ThrowableWeapon, Warrior } from "./interfaces";
import { TYPES } from "./types";

@injectable()
Expand Down
4 changes: 2 additions & 2 deletions wiki/constructor_injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Ninja implements Ninja {
private _shuriken: Shuriken;

public constructor(
@inject("Newable<Katana>") Katana: Newable<Katana>,
@inject("Newable<Katana>") Katana: interfaces.Newable<Katana>,
@inject("Shuriken") shuriken: Shuriken
) {
this._katana = new Katana();
Expand Down Expand Up @@ -54,4 +54,4 @@ class Ninja implements Ninja {

```ts
container.bind<Dagger>(Dagger).toSelf()
```
```
4 changes: 2 additions & 2 deletions wiki/container_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ Named bindings:

```ts
let container = new Container();
container.bind<Weapon>("Weapon").to(Katana).whenTargetNamed("japonese");
container.bind<Weapon>("Weapon").to(Katana).whenTargetNamed("japanese");
container.bind<Weapon>("Weapon").to(Shuriken).whenTargetNamed("chinese");

let katana = container.getNamed<Weapon>("Weapon", "japonese");
let katana = container.getNamed<Weapon>("Weapon", "japanese");
let shuriken = container.getNamed<Weapon>("Weapon", "chinese");
```

Expand Down
1 change: 1 addition & 0 deletions wiki/ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Consider these the “staff picks”, and don’t hesitate to submit a PR if you
- [Prettygoat](https://www.npmjs.com/package/prettygoat) - The not so baaaaaaad Event Sourcing Projection Engine.
- [Retax](https://github.com/retaxJS) - Universal React Redux Framework.
- [RobotlegsJS](https://github.com/GoodgameStudios/RobotlegsJS) - An architecture-based framework for JavaScript/TypeScript canvas applications.
- [SugoiJS](https://github.com/sugoiJS/Demo) - TypeScript modular framework for building web server, also using inversify-express-utils.



Expand Down
2 changes: 1 addition & 1 deletion wiki/factory_injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DieselCarFactory implements CarFactory {
constructor(
@inject("Factory<Engine>") factory: (category: string) => (displacement: number) => Engine // Injecting an engine factory
) {
this._dieselFactory = factory("diesel"); // Creating a diesel engine facotry
this._dieselFactory = factory("diesel"); // Creating a diesel engine factory
}
public createEngine(displacement: number): Engine {
return this._dieselFactory(displacement); // Creating a concrete diesel engine
Expand Down

0 comments on commit 3fe39e7

Please sign in to comment.