refactor(ivy): generate vars in component defs (#25562)

PR Close #25562
This commit is contained in:
Kara Erickson
2018-08-18 11:14:50 -07:00
committed by Jason Aden
parent d2be3d5775
commit 21a14407f6
48 changed files with 1043 additions and 757 deletions

View File

@ -62,6 +62,14 @@ export function defineComponent<T>(componentDefinition: {
// TODO(kara): remove queries from this count
consts: number;
/**
* The number of bindings in this component template (including pure fn bindings).
*
* Used to calculate the length of the component's LViewData array, so we
* can pre-fill the array and set the host binding start index.
*/
vars: number;
/**
* Static attributes to set on host element.
*
@ -255,6 +263,7 @@ export function defineComponent<T>(componentDefinition: {
type: type,
diPublic: null,
consts: componentDefinition.consts,
vars: componentDefinition.vars,
factory: componentDefinition.factory,
template: componentDefinition.template || null !,
hostBindings: componentDefinition.hostBindings || null,