@fluojs/core 1.0.2 → 1.0.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.ko.md CHANGED
@@ -81,7 +81,15 @@ class UsesConfigValue {
81
81
  }
82
82
  ```
83
83
 
84
- 여러 constructor 토큰은 `@Inject(A, B)`처럼 variadic 호출로 지정하면 dependency metadata가 표준 데코레이터 사용 방식과 맞게 유지됩니다. `@Inject([A, B])` 배열 형태도 허용되지만, 새 코드는 variadic 형태를 사용하는 것이 좋습니다. 데코레이션 시점에 아직 사용할 수 없는 토큰은 해당 토큰만 `forwardRef(...)`로 감싸고, 없어도 되는 의존성은 해당 토큰만 `optional(...)`로 감쌉니다.
84
+ 여러 constructor 토큰은 `@Inject(A, B)`처럼 variadic 호출로 지정하면 dependency metadata가 표준 데코레이터 사용 방식과 맞게 유지됩니다. `@Inject([A, B])` 배열 형태도 허용되지만, 새 코드는 variadic 형태를 사용하는 것이 좋습니다. 데코레이션 시점에 아직 사용할 수 없는 토큰은 해당 토큰만 `forwardRef(...)`로 감싸고, 없어도 되는 의존성은 해당 토큰만 `optional(...)`로 감쌉니다. 이 wrapper helper들은 `@fluojs/di`가 제공하는 runtime DI helper입니다. `@fluojs/core`는 `@Inject(...)`가 받는 공유 wrapper 타입만 export합니다.
85
+
86
+ ```ts
87
+ import { Inject } from '@fluojs/core';
88
+ import { forwardRef, optional } from '@fluojs/di';
89
+
90
+ @Inject(forwardRef(() => AuditLogger), optional(CacheClient))
91
+ class UsesDeferredAndOptionalDeps {}
92
+ ```
85
93
 
86
94
  ### 형제 패키지를 위한 공용 메타데이터 헬퍼
87
95
 
package/README.md CHANGED
@@ -83,7 +83,15 @@ class UsesConfigValue {
83
83
  }
84
84
  ```
85
85
 
86
- Pass multiple constructor tokens as variadic arguments, such as `@Inject(A, B)`, so dependency metadata stays aligned with standard decorator usage. The array form `@Inject([A, B])` is also accepted, but new code should prefer the variadic form. If a token is unavailable at decoration time, wrap that one token with `forwardRef(...)`; if a dependency may be absent, wrap that token with `optional(...)`.
86
+ Pass multiple constructor tokens as variadic arguments, such as `@Inject(A, B)`, so dependency metadata stays aligned with standard decorator usage. The array form `@Inject([A, B])` is also accepted, but new code should prefer the variadic form. If a token is unavailable at decoration time, wrap that one token with `forwardRef(...)`; if a dependency may be absent, wrap that token with `optional(...)`. The wrapper helpers are runtime DI helpers from `@fluojs/di`; `@fluojs/core` only exports the shared wrapper types accepted by `@Inject(...)`.
87
+
88
+ ```ts
89
+ import { Inject } from '@fluojs/core';
90
+ import { forwardRef, optional } from '@fluojs/di';
91
+
92
+ @Inject(forwardRef(() => AuditLogger), optional(CacheClient))
93
+ class UsesDeferredAndOptionalDeps {}
94
+ ```
87
95
 
88
96
  ### Shared metadata helpers for sibling packages
89
97
 
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "types",
10
10
  "foundation"
11
11
  ],
12
- "version": "1.0.2",
12
+ "version": "1.0.3",
13
13
  "private": false,
14
14
  "license": "MIT",
15
15
  "repository": {