You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a new issue that is related to some discussion I saw in #10 to talk about having the compiler support automatically "pre-compiling" each currencyFormatter with a pre-set list of currencies provided separately. In cases where the currency may be dynamically chosen, but from a set of known values, it would be much simpler to be able to declare the formatter once, and have the compiler automatically expand this.
A similar behavior could be added for units, which I believe has a similar pattern.
I'm not sure how to implement this, but as far as API goes, having another property on options passed to compile(), such as supportedCurrencies/supportedUnits seems like the right approach. Without this present, the compiler would take the formatters literally, but with them present (or, perhaps with them present with a special sentinel value for currency/units), it would auto-expand and generate individual formatters for each of the passed in currencies/units.
The text was updated successfully, but these errors were encountered:
Creating a new issue that is related to some discussion I saw in #10 to talk about having the compiler support automatically "pre-compiling" each
currencyFormatter
with a pre-set list of currencies provided separately. In cases where the currency may be dynamically chosen, but from a set of known values, it would be much simpler to be able to declare the formatter once, and have the compiler automatically expand this.A similar behavior could be added for units, which I believe has a similar pattern.
I'm not sure how to implement this, but as far as API goes, having another property on
options
passed tocompile()
, such assupportedCurrencies/supportedUnits
seems like the right approach. Without this present, the compiler would take the formatters literally, but with them present (or, perhaps with them present with a special sentinel value for currency/units), it would auto-expand and generate individual formatters for each of the passed in currencies/units.The text was updated successfully, but these errors were encountered: