feat(ivy): Add InheritanceDefinitionFeature to support directive inheritance (#24570)
- Adds InheritanceDefinitionFeature to ivy - Ensures that lifecycle hooks are inherited from super classes whether they are defined as directives or not - Directives cannot inherit from Components - Components can inherit from Directives or Components - Ensures that Inputs, Outputs, and Host Bindings are inherited - Ensures that super class Features are run PR Close #24570
This commit is contained in:
@ -96,6 +96,12 @@ export interface DirectiveDef<T, Selector extends string> {
|
||||
*/
|
||||
readonly inputs: {[P in keyof T]: P};
|
||||
|
||||
/**
|
||||
* @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
|
||||
* public or minified name.
|
||||
*/
|
||||
readonly declaredInputs: {[P in keyof T]: P};
|
||||
|
||||
/**
|
||||
* A dictionary mapping the outputs' minified property names to their public API names, which
|
||||
* are their aliases if any, or their original unminified property names
|
||||
@ -135,6 +141,11 @@ export interface DirectiveDef<T, Selector extends string> {
|
||||
afterViewInit: (() => void)|null;
|
||||
afterViewChecked: (() => void)|null;
|
||||
onDestroy: (() => void)|null;
|
||||
|
||||
/**
|
||||
* The features applied to this directive
|
||||
*/
|
||||
features: DirectiveDefFeature[]|null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user