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
I"d like to suggest that format and formatToParts take a dictionary whose values are either unknown or instances of MessageValue. This allows two interesting use-cases:
Pre-set certain formatting options on input values.
Pass instances of custom types which extend MessageValue.
Then, you"d first check if an un-annotated value is an instance of MessageValue. If so, carry on. If not, resolve to MessageUnknownValue. This way, you don"t have to try to resolve every expression to a number and string first.
Currently, the proposal allows for inputs with object values (for example, see step 7 of MessageFormat Number Functions) that may have a valueOf() method and an object property.
Is that sufficient to serve the use cases presented here?
I"d like to suggest that
format
andformatToParts
take a dictionary whose values are eitherunknown
or instances ofMessageValue
. This allows two interesting use-cases:MessageValue
.Then, you"d first check if an un-annotated value is an instance of
MessageValue
. If so, carry on. If not, resolve toMessageUnknownValue
. This way, you don"t have to try to resolve every expression to a number and string first.Originally posted by @stasm in #22 (comment)
The text was updated successfully, but these errors were encountered: