Commit 4b7de27
authored
feat(angular/directive): export FeatureFlagDirectiveContext (#1346)
## This PR
Exports `FeatureFlagDirectiveContext<T>` from the Angular SDK public
API.
This change enables external consumers (such as the OpenFeature CLI
Angular generator) to safely extend `FeatureFlagDirective<T>` while
preserving proper template typing.
Previously, `FeatureFlagDirectiveContext<T>` was not exported, which
made it impossible to correctly type:
`TemplateRef<FeatureFlagDirectiveContext<T>>` when extending
`FeatureFlagDirective<T>` outside of the SDK.
This PR:
- Exports `FeatureFlagDirectiveContext<T>` from the `angular-sdk` public
API
- Does not introduce any breaking changes
- Does not modify runtime behavior
- Only expands the public surface to support extension use cases
This change is required to support the CLI refactor that generates
derived structural directives instead of relying on `hostDirectives`.
### Related Issues
Fixes #1345
### Notes
- This is a non-breaking change.
- No internal logic has been modified.
- The export simply makes an already existing type publicly available.
### Follow-up Tasks
- Update the OpenFeature CLI Angular generator to extend
`FeatureFlagDirective<T>` directly (instead of using `hostDirectives`)
see : open-feature/cli#217
### How to test
1. Build the Angular SDK package.
2. In an external Angular project, create a directive extending:
`FeatureFlagDirective<boolean>`
3. Inject: `TemplateRef<FeatureFlagDirectiveContext<boolean>>`
4. Verify:
- TypeScript compiles without internal imports
- Template typing is preserved
- No runtime behavior changes occur
---------
Signed-off-by: backtrack5r3 <flennertom@gmail.com>1 parent e79c06a commit 4b7de27
File tree
2 files changed
+48
-1
lines changed- packages/angular/projects/angular-sdk/src/lib
2 files changed
+48
-1
lines changedLines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
184 | 201 | | |
185 | 202 | | |
186 | 203 | | |
| |||
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
25 | 55 | | |
26 | 56 | | |
27 | 57 | | |
| |||
0 commit comments