@armscye/container 0.5.0 → 0.5.5
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/dist/class-provider.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ProviderToken } from './provider-token';
|
|
|
3
3
|
/**
|
|
4
4
|
* Configures the `Container` to return a value by instantiating `useClass` class.
|
|
5
5
|
*/
|
|
6
|
-
export interface ClassProvider {
|
|
6
|
+
export interface ClassProvider<T = any> {
|
|
7
7
|
/**
|
|
8
8
|
* Provider token.
|
|
9
9
|
*/
|
|
@@ -11,7 +11,7 @@ export interface ClassProvider {
|
|
|
11
11
|
/**
|
|
12
12
|
* Class to instantiate for the `token`.
|
|
13
13
|
*/
|
|
14
|
-
useClass: NoArgument<
|
|
14
|
+
useClass: NoArgument<T>;
|
|
15
15
|
/**
|
|
16
16
|
* Whether the created instance should be cached.
|
|
17
17
|
*/
|
|
@@ -3,7 +3,7 @@ import { ProviderToken } from './provider-token';
|
|
|
3
3
|
/**
|
|
4
4
|
* Configures the `Container` to return a value by invoking a `useFactory` function.
|
|
5
5
|
*/
|
|
6
|
-
export interface FactoryProvider {
|
|
6
|
+
export interface FactoryProvider<T = any> {
|
|
7
7
|
/**
|
|
8
8
|
* Provider token.
|
|
9
9
|
*/
|
|
@@ -12,7 +12,7 @@ export interface FactoryProvider {
|
|
|
12
12
|
* A function to invoke to create an instance for this `token`. The function is
|
|
13
13
|
* invoked with resolved values of token`s from an instance of the container.
|
|
14
14
|
*/
|
|
15
|
-
useFactory: Factory<
|
|
15
|
+
useFactory: Factory<T>;
|
|
16
16
|
/**
|
|
17
17
|
* Whether the created instance should be cached.
|
|
18
18
|
*/
|
package/dist/value-provider.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ProviderToken } from './provider-token';
|
|
|
2
2
|
/**
|
|
3
3
|
* Configures the `Container` to return a value for a token.
|
|
4
4
|
*/
|
|
5
|
-
export interface ValueProvider {
|
|
5
|
+
export interface ValueProvider<T = any> {
|
|
6
6
|
/**
|
|
7
7
|
* Provider token.
|
|
8
8
|
*/
|
|
@@ -10,5 +10,5 @@ export interface ValueProvider {
|
|
|
10
10
|
/**
|
|
11
11
|
* The value to inject.
|
|
12
12
|
*/
|
|
13
|
-
useValue:
|
|
13
|
+
useValue: T;
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@armscye/container",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "A collection of shared standard TypeScript definitions (@container)",
|
|
5
5
|
"author": "Augustus Kamau",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"container"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@armscye/core": "^0.4.
|
|
18
|
+
"@armscye/core": "^0.4.2"
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/armscye/armscye#readme",
|
|
21
21
|
"repository": {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "f2c6dfb2e0c1371f917c6b3b0dba73a70302f595"
|
|
32
32
|
}
|