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
Right now we have two ways to control decimal behavior:
decimalOptions, either a configuration object or a function that returns a configuration object given the context passed into the 'decimal' converter. This includes how many digits we want to accept, whether we want to allow zeroes and negative numbers.
TokenOptions/StateConverterOptions. This determines what the separators are for decimal rendering and whether we render thousands and are passed into the state and are accessed when we convert, render, etc.
Both offer run-time dynamism; the first gets this information from the context, whereas the second hardcodes this information along with the context.
We should unify these two mechanisms. That will make it easier to make number obey the same rules as decimal (right now some bits are hardcoded too). Which direction we should go in I'm not sure about yet. It can stand as a general mechanism for run-time control over the behavior of converters.
The text was updated successfully, but these errors were encountered:
Right now we have two ways to control decimal behavior:
decimalOptions, either a configuration object or a function that returns a configuration object given the context passed into the 'decimal' converter. This includes how many digits we want to accept, whether we want to allow zeroes and negative numbers.
TokenOptions/StateConverterOptions. This determines what the separators are for decimal rendering and whether we render thousands and are passed into the state and are accessed when we convert, render, etc.
Both offer run-time dynamism; the first gets this information from the context, whereas the second hardcodes this information along with the context.
We should unify these two mechanisms. That will make it easier to make number obey the same rules as decimal (right now some bits are hardcoded too). Which direction we should go in I'm not sure about yet. It can stand as a general mechanism for run-time control over the behavior of converters.
The text was updated successfully, but these errors were encountered: