ts-ioc-container 50.2.1 → 50.2.2
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 +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2576,6 +2576,9 @@ Sometimes you want to register provider with certain key. This is what `key` is
|
|
|
2576
2576
|
- by default, key is class name
|
|
2577
2577
|
- you can assign the same key to different registrations
|
|
2578
2578
|
|
|
2579
|
+
> [!TIP]
|
|
2580
|
+
> Prefer `SingleToken<T>` over plain string literals as registration keys. Tokens are type-safe, rename-friendly, and prevent typos that only surface at runtime.
|
|
2581
|
+
|
|
2579
2582
|
```typescript
|
|
2580
2583
|
import {
|
|
2581
2584
|
bindTo,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-ioc-container",
|
|
3
|
-
"version": "50.2.
|
|
3
|
+
"version": "50.2.2",
|
|
4
4
|
"description": "Fast, lightweight TypeScript dependency injection container with a clean API, scoped lifecycles, decorators, tokens, hooks, lazy injection, customizable providers, and no global container objects.",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"docs"
|