refactor(core): rename synthetic host property and listener instructions (#37145)

This commit updates synthetic host property and listener instruction names to better align with other instructions.
The `ɵɵupdateSyntheticHostBinding` instruction was renamed to `ɵɵsyntheticHostProperty` (to match the `ɵɵhostProperty`
instruction name) and `ɵɵcomponentHostSyntheticListener` was renamed to `ɵɵsyntheticHostListener` since this
instruction is generated for both Components and Directives (so 'component' is removed from the name).
This PR is a followup after PR #35568.

PR Close #37145
This commit is contained in:
Andrew Kushnir
2020-05-15 15:33:00 -07:00
parent eae13e42f3
commit d72b1e44c6
11 changed files with 34 additions and 34 deletions

View File

@ -124,7 +124,6 @@ export {
ɵɵclassMapInterpolateV,
ɵɵclassProp,
ɵɵComponentDefWithMeta,
ɵɵcomponentHostSyntheticListener,
ɵɵcontentQuery,
ɵɵCopyDefinitionFeature,
ɵɵdefineComponent,
@ -227,6 +226,8 @@ export {
ɵɵstylePropInterpolate7,
ɵɵstylePropInterpolate8,
ɵɵstylePropInterpolateV,
ɵɵsyntheticHostListener,
ɵɵsyntheticHostProperty,
ɵɵtemplate,
ɵɵtemplateRefExtractor,
ɵɵtext,
@ -240,7 +241,6 @@ export {
ɵɵtextInterpolate7,
ɵɵtextInterpolate8,
ɵɵtextInterpolateV,
ɵɵupdateSyntheticHostBinding,
ɵɵviewQuery,
} from './render3/index';
export {

View File

@ -48,7 +48,6 @@ export {
ɵɵclassMapInterpolateV,
ɵɵclassProp,
ɵɵcomponentHostSyntheticListener,
ɵɵdirectiveInject,
@ -113,6 +112,9 @@ export {
ɵɵstylePropInterpolate8,
ɵɵstylePropInterpolateV,
ɵɵsyntheticHostListener,
ɵɵsyntheticHostProperty,
ɵɵtemplate,
ɵɵtext,
@ -126,8 +128,6 @@ export {
ɵɵtextInterpolate7,
ɵɵtextInterpolate8,
ɵɵtextInterpolateV,
ɵɵupdateSyntheticHostBinding,
} from './instructions/all';
export {RenderFlags} from './interfaces/definition';
export {

View File

@ -62,9 +62,9 @@ export function ɵɵhostProperty<T>(
*
* @codeGenApi
*/
export function ɵɵupdateSyntheticHostBinding<T>(
export function ɵɵsyntheticHostProperty<T>(
propName: string, value: T|NO_CHANGE,
sanitizer?: SanitizerFn|null): typeof ɵɵupdateSyntheticHostBinding {
sanitizer?: SanitizerFn|null): typeof ɵɵsyntheticHostProperty {
const lView = getLView();
const bindingIndex = nextBindingIndex();
if (bindingUpdated(lView, bindingIndex, value)) {
@ -75,5 +75,5 @@ export function ɵɵupdateSyntheticHostBinding<T>(
elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);
ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);
}
return ɵɵupdateSyntheticHostBinding;
return ɵɵsyntheticHostProperty;
}

View File

@ -68,9 +68,9 @@ export function ɵɵlistener(
*
* @codeGenApi
*/
export function ɵɵcomponentHostSyntheticListener(
export function ɵɵsyntheticHostListener(
eventName: string, listenerFn: (e?: any) => any, useCapture = false,
eventTargetResolver?: GlobalTargetResolver): typeof ɵɵcomponentHostSyntheticListener {
eventTargetResolver?: GlobalTargetResolver): typeof ɵɵsyntheticHostListener {
const tNode = getPreviousOrParentTNode();
const lView = getLView();
const tView = getTView();
@ -78,7 +78,7 @@ export function ɵɵcomponentHostSyntheticListener(
const renderer = loadComponentRenderer(currentDef, tNode, lView);
listenerInternal(
tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver);
return ɵɵcomponentHostSyntheticListener;
return ɵɵsyntheticHostListener;
}
/**

View File

@ -75,8 +75,8 @@ export const angularCoreEnv: {[name: string]: Function} =
'ɵɵrestoreView': r3.ɵɵrestoreView,
'ɵɵlistener': r3.ɵɵlistener,
'ɵɵprojection': r3.ɵɵprojection,
'ɵɵupdateSyntheticHostBinding': r3.ɵɵupdateSyntheticHostBinding,
'ɵɵcomponentHostSyntheticListener': r3.ɵɵcomponentHostSyntheticListener,
'ɵɵsyntheticHostProperty': r3.ɵɵsyntheticHostProperty,
'ɵɵsyntheticHostListener': r3.ɵɵsyntheticHostListener,
'ɵɵpipeBind1': r3.ɵɵpipeBind1,
'ɵɵpipeBind2': r3.ɵɵpipeBind2,
'ɵɵpipeBind3': r3.ɵɵpipeBind3,