ts-ioc-container 23.3.3 → 23.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ class App {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const container = new Container(new ReflectionInjector()).register('ILogger', Provider.fromClass(Logger));
|
|
67
|
-
container.resolve(App).
|
|
67
|
+
container.resolve(App).logger.name === 'Logger'; // true
|
|
68
68
|
|
|
69
69
|
container.dispose();
|
|
70
70
|
```
|
|
@@ -72,7 +72,7 @@ container.dispose();
|
|
|
72
72
|
### Scopes
|
|
73
73
|
Sometimes you need to create a scope of container. For example, when you want to create a scope per request in web application.
|
|
74
74
|
|
|
75
|
-
- NOTICE: remember that when
|
|
75
|
+
- NOTICE: remember that when scope doesn't have dependency then it will be resolved from parent container
|
|
76
76
|
- NOTICE: when you create a scope of container then all providers are cloned to new scope. For that reason every provider has methods `clone` and `isValid` to clone itself and check if it's valid for certain scope accordingly.
|
|
77
77
|
|
|
78
78
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-ioc-container",
|
|
3
|
-
"version": "23.3.
|
|
3
|
+
"version": "23.3.4",
|
|
4
4
|
"description": "Typescript IoC container",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"ts-jest": "27.0.5",
|
|
53
53
|
"typescript": "4.4.3"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "62bde181e5286f8d43611f8b740ed3e230bb4768"
|
|
56
56
|
}
|