ts-ioc-container 31.5.0 → 31.6.0
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/cjm/by.js +1 -3
- package/esm/by.js +1 -3
- package/package.json +2 -2
- package/typings/registration/IRegistration.d.ts +2 -2
package/cjm/by.js
CHANGED
|
@@ -9,9 +9,7 @@ exports.by = {
|
|
|
9
9
|
* Get the instance that matches the given alias or fail
|
|
10
10
|
* @param predicate
|
|
11
11
|
*/
|
|
12
|
-
alias: (predicate) => (c, ...args) => {
|
|
13
|
-
return c.resolveOneByAlias(predicate, { args });
|
|
14
|
-
},
|
|
12
|
+
alias: (predicate) => (c, ...args) => c.resolveOneByAlias(predicate, { args }),
|
|
15
13
|
/**
|
|
16
14
|
* Get all instances that match the given keys
|
|
17
15
|
* @param keys
|
package/esm/by.js
CHANGED
|
@@ -5,9 +5,7 @@ export const by = {
|
|
|
5
5
|
* Get the instance that matches the given alias or fail
|
|
6
6
|
* @param predicate
|
|
7
7
|
*/
|
|
8
|
-
alias: (predicate) => (c, ...args) => {
|
|
9
|
-
return c.resolveOneByAlias(predicate, { args });
|
|
10
|
-
},
|
|
8
|
+
alias: (predicate) => (c, ...args) => c.resolveOneByAlias(predicate, { args }),
|
|
11
9
|
/**
|
|
12
10
|
* Get all instances that match the given keys
|
|
13
11
|
* @param keys
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-ioc-container",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.6.0",
|
|
4
4
|
"description": "Typescript IoC container",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"ts-node": "^10.9.1",
|
|
60
60
|
"typescript": "5.4.3"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "63c563f7c96196a7b0174a0c47b71fd69483783a"
|
|
63
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DependencyKey,
|
|
1
|
+
import { DependencyKey, IContainer, IContainerModule } from '../container/IContainer';
|
|
2
2
|
import { constructor, MapFn } from '../utils';
|
|
3
3
|
import { IProvider } from '../provider/IProvider';
|
|
4
|
-
export type ScopePredicate = (
|
|
4
|
+
export type ScopePredicate = (s: IContainer) => boolean;
|
|
5
5
|
export interface IRegistration<T = unknown> extends IContainerModule {
|
|
6
6
|
when(isValidWhen: ScopePredicate): this;
|
|
7
7
|
to(key: DependencyKey): this;
|