angular/devtools/projects
Doug Parker d47cf58f10 refactor(core): update ng.getDirectiveMetadata to support Wiz and ACX (#60475)
This allows `ng.getDirectiveMetadata` to be implemented by Wiz and ACX with subtly different shapes to match the nuances of those frameworks.

Existing usage of `{Component,Directive}DebugMetadata` was moved over to `Angular{Component,Directive}DebugMetadata` as appropriate, since the implementation of `ng` in `@angular/core` is specific to Angular. Only the types support Wiz and ACX.

I opted to merge `ComponentDebugMetadata` and `DirectiveDebugMetadata` into a single type of all the frameworks including both components and directives (recall that components extend directives). The reasoning for this is because Wiz does not support directives (you can kind of think of "Wiz Directive" as an abstract class extended by "Wiz Components"). I felt that a `DirectiveDebugMetadata` containing only Angular and ACX types would be a bit of a trap and lead to bugs when used. It's safer to just have the single type containing all the possible results from `ng.getDirectiveMetadata`.

I also chose to leave the `ng` type as is internally, since `@angular/core` implements a specific concrete version of it narrowed to Angular types. Separately I defined an expanded `FrameworkAgnosticGlobalUtils` which redefines `ng.getDirectiveMetadata` to include Wiz and ACX. We want this type to exist in the Angular GitHub repo so it can be referenced as a common primitive across all three frameworks. This is sufficient for now, however longer term we will likely want to actually manually define the function types in this framework-agnostic interface and make Angular's version properly implement it rather than extend and overwrite Angular's type.

PR Close #60475
2025-03-27 20:26:12 +00:00
..
demo-no-zone refactor(devtools): migrate devtools to prettier formatting (#58624) 2024-11-19 16:31:24 -08:00
demo-standalone refactor(devtools): styles management (#59589) 2025-02-12 10:47:02 -08:00
ng-devtools refactor(devtools): extract and organize colors into themes (#60374) 2025-03-27 18:10:28 +00:00
ng-devtools-backend refactor(core): update ng.getDirectiveMetadata to support Wiz and ACX (#60475) 2025-03-27 20:26:12 +00:00
protocol feat(devtools): add the onpush label for marked onpush components in the components tree view (#60059) 2025-02-26 11:20:22 -05:00
shared-utils refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
shell-browser release: bump Angular DevTools version to 1.0.26 (#60309) 2025-03-10 11:40:26 -07:00