@kurdel/ioc 0.1.0-beta.3 → 0.1.0-beta.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/lib/runtime/binding-in-contract.d.ts +1 -1
- package/lib/runtime/binding-in-contract.js +1 -1
- package/lib/runtime/binding-to-contract-impl.d.ts +2 -2
- package/lib/runtime/binding-to-contract-impl.js +2 -2
- package/lib/runtime/ioc-container.d.ts +1 -1
- package/lib/runtime/ioc-container.js +1 -1
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ export declare class BindingInContract<T> {
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
|
-
* container.bind<
|
|
17
|
+
* container.bind<Database>(Database).to(SQLiteDatabase).inSingletonScope();
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
inSingletonScope(): this;
|
|
@@ -14,7 +14,7 @@ export class BindingInContract {
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
|
-
* container.bind<
|
|
17
|
+
* container.bind<Database>(Database).to(SQLiteDatabase).inSingletonScope();
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
inSingletonScope() {
|
|
@@ -15,7 +15,7 @@ export declare class BindingToContractImpl<T> implements BindingToContract<T> {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
|
-
* container.bind(
|
|
18
|
+
* container.bind(Database).to(SQLiteDatabase);
|
|
19
19
|
* ```
|
|
20
20
|
*
|
|
21
21
|
* @param constructor The class to instantiate when resolving this identifier.
|
|
@@ -29,7 +29,7 @@ export declare class BindingToContractImpl<T> implements BindingToContract<T> {
|
|
|
29
29
|
* @example
|
|
30
30
|
* ```ts
|
|
31
31
|
* const db = new SQLiteDatabase();
|
|
32
|
-
* container.bind(
|
|
32
|
+
* container.bind(Database).toInstance(db);
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
35
|
* @param instance The instance to use when resolving this identifier.
|
|
@@ -14,7 +14,7 @@ export class BindingToContractImpl {
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
|
-
* container.bind(
|
|
17
|
+
* container.bind(Database).to(SQLiteDatabase);
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* @param constructor The class to instantiate when resolving this identifier.
|
|
@@ -31,7 +31,7 @@ export class BindingToContractImpl {
|
|
|
31
31
|
* @example
|
|
32
32
|
* ```ts
|
|
33
33
|
* const db = new SQLiteDatabase();
|
|
34
|
-
* container.bind(
|
|
34
|
+
* container.bind(Database).toInstance(db);
|
|
35
35
|
* ```
|
|
36
36
|
*
|
|
37
37
|
* @param instance The instance to use when resolving this identifier.
|
|
@@ -40,7 +40,7 @@ export declare class IoCContainer implements Container {
|
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
42
|
* ```ts
|
|
43
|
-
* container.bind<
|
|
43
|
+
* container.bind<Database>(Database).to(SQLiteDatabase);
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
46
|
bind<T>(key: Identifier<T>): BindingToContract<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurdel/ioc",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.4",
|
|
4
4
|
"description": "Dependency injection container for Kurdel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"tsc-alias": "^1.8.16"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@kurdel/common": "0.1.0-beta.
|
|
54
|
+
"@kurdel/common": "0.1.0-beta.4"
|
|
55
55
|
}
|
|
56
56
|
}
|