perf(ivy): move local references into consts array (#33129)
Follow-up from #32798. Moves the local references array into the component def's `consts` in order to make it compress better. Before: ``` const _c0 = ['foo', '']; SomeComp.ngComponentDef = defineComponent({ template: function() { element(0, 'div', null, _c0); } }); ``` After: ``` SomeComp.ngComponentDef = defineComponent({ consts: [['foo', '']], template: function() { element(0, 'div', null, 0); } }); ``` PR Close #33129
This commit is contained in:
@ -224,6 +224,13 @@ export const enum AttributeMarker {
|
||||
*/
|
||||
export type TAttributes = (string | AttributeMarker | CssSelector)[];
|
||||
|
||||
/**
|
||||
* Constants that are associated with a view. Includes:
|
||||
* - Attribute arrays.
|
||||
* - Local definition arrays.
|
||||
*/
|
||||
export type TConstants = (TAttributes | string)[];
|
||||
|
||||
/**
|
||||
* Binding data (flyweight) for a particular node that is shared between all templates
|
||||
* of a specific type.
|
||||
|
Reference in New Issue
Block a user