We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
template.stylesheets
Currently our generated code for templates looks like this:
tmpl.stylesheets = []; if (_implicitStylesheets) { tmpl.stylesheets.push.apply(tmpl.stylesheets, _implicitStylesheets); } if (_implicitScopedStylesheets) { tmpl.stylesheets.push.apply(tmpl.stylesheets, _implicitScopedStylesheets); }
This is a lot of boilerplate. Now that all our supported browsers support rest/spread, we can probably do something like this instead:
tmpl.stylesheets = [ ...(_implicitStylesheets ?? EmptyArray), ...(_implicitScopedStylesheets ?? EmptyArray) ];
(where EmptyArray is some shared constant that resolves to [] – to avoid excessive GC).
EmptyArray
[]
This might have some mild perf and compat considerations, so this would need to be done carefully.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently our generated code for templates looks like this:
This is a lot of boilerplate. Now that all our supported browsers support rest/spread, we can probably do something like this instead:
(where
EmptyArray
is some shared constant that resolves to[]
– to avoid excessive GC).This might have some mild perf and compat considerations, so this would need to be done carefully.
The text was updated successfully, but these errors were encountered: