@thomasrepnik/ts-implscan 0.1.2 → 0.1.3
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 +4 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@thomasrepnik/ts-implscan)
|
|
4
4
|
[](https://github.com/thomasrepnik/ts-implscan/actions/workflows/ci.yml)
|
|
5
5
|
|
|
6
|
-
**Spring-style `List<
|
|
6
|
+
**Spring-style `List<PaymentHandler>` injection for TypeScript.** Mark an interface with `ImplScan`, and a
|
|
7
|
+
build-time generator collects every class that implements it into a typed registry. For Angular,
|
|
8
|
+
it also generates the `InjectionToken`s and providers.
|
|
7
9
|
|
|
8
10
|
## Installation
|
|
9
11
|
|
|
@@ -213,7 +215,7 @@ reasons, such as Angular's `OnInit`.
|
|
|
213
215
|
|
|
214
216
|
- **Plugin and strategy patterns**, such as payment providers, exporters, validators, notification
|
|
215
217
|
channels or feature handlers, where the set of implementations keeps growing.
|
|
216
|
-
- **Teams coming from Spring or Java** who want the open/closed principle that `List<
|
|
218
|
+
- **Teams coming from Spring or Java** who want the open/closed principle that `List<PaymentHandler>` injection
|
|
217
219
|
gives them: adding behaviour means adding a class, not editing a central list.
|
|
218
220
|
- **Angular apps** with many multi-provider tokens, so nobody forgets to register a new
|
|
219
221
|
implementation, or to write the token.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thomasrepnik/ts-implscan",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Spring-style List<
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Spring-style List<PaymentHandler> injection for TypeScript: find every class implementing a marked interface and generate a typed registry, plus Angular InjectionTokens and providers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
7
7
|
"dependency-injection",
|