Skip to content

perf: consider removing any[] from the RendererType2.styles #48317

@AndrewKushnir

Description

@AndrewKushnir

Which @angular/* package(s) are relevant/related to the feature request?

core

Description

Currently, the RendererType2.styles is typed in a way that allows passing deeply nested arrays of styles:

styles: (string|any[])[];

For this reason, we need to have a flatten operation in renderers:

const styles = flattenStyles(type.id, type.styles, []);

We should consider updating the code to only accept a flat list of styles (i.e. string[]) and dropping the flattening operation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions