@@ -100,8 +100,8 @@ You can bind to a class, a value, or a factory. It is also possible to alias exi
100100
101101```
102102var inj = new Injector([
103- bind(Car).toClass(Car)
104- bind(Engine).toClass(Engine);
103+ bind(Car).toClass(Car),
104+ bind(Engine).toClass(Engine)
105105]);
106106
107107var inj = new Injector([
@@ -124,7 +124,7 @@ You can bind any token.
124124```
125125var inj = new Injector([
126126 bind(Car).toFactory((e) => new Car(), ["engine!"]),
127- bind("engine!").toClass(Engine);
127+ bind("engine!").toClass(Engine)
128128]);
129129```
130130
@@ -360,7 +360,7 @@ Or we can register a factory function:
360360
361361```
362362var inj = new Injector([
363- bind('MyClassFactory').toFactory(dep => () => new MyClass(dep), [SomeDependency]);
363+ bind('MyClassFactory').toFactory(dep => () => new MyClass(dep), [SomeDependency])
364364]);
365365
366366var inj.get('MyClassFactory')();
@@ -374,7 +374,7 @@ Most of the time we do not have to deal with keys.
374374
375375```
376376var inj = new Injector([
377- bind(Engine).toFactory(() => new TurboEngine()); //the passed in token Engine gets mapped to a key
377+ bind(Engine).toFactory(() => new TurboEngine()) //the passed in token Engine gets mapped to a key
378378]);
379379var engine = inj.get(Engine); //the passed in token Engine gets mapped to a key
380380```
@@ -385,7 +385,7 @@ Now, the same example, but with keys
385385var ENGINE_KEY = Key.get(Engine);
386386
387387var inj = new Injector([
388- bind(ENGINE_KEY).toFactory(() => new TurboEngine()); // no mapping
388+ bind(ENGINE_KEY).toFactory(() => new TurboEngine()) // no mapping
389389]);
390390var engine = inj.get(ENGINE_KEY); // no mapping
391391```
0 commit comments