@@ -216,7 +216,23 @@ whether its value was originally _quoted_ or _unquoted_.
216216> For example,
217217> the _option_ ` foo = 42 ` and the _option_ ` foo = | 42 | ` are treated as identical.
218218
219- The resolution of a _text_ or _literal_ MUST resolve to a string.
219+ The resolution of a _text_ or _literal_ MUST resolve with a string value.
220+
221+ > For example, in a JavaScript formatter
222+ > the _resolved value_ of a _text_ or a _literal_ could have the following implementation:
223+ >
224+ > ` ` ` ts
225+ > class MessageLiteral implements MessageValue {
226+ > constructor (value : string ) {
227+ > this .formatToString = () => value ;
228+ > this .getValue = () => value ;
229+ > }
230+ > resolvedOptions: () => ({});
231+ > selectKeys(_keys : string []) {
232+ > throw Error (" Selection on unannotated literals is not supported" );
233+ > }
234+ > }
235+ > ` ` `
220236
221237### Variable Resolution
222238
@@ -226,6 +242,9 @@ If a _declaration_ exists for the _variable_, its _resolved value_ is used.
226242Otherwise, the _variable_ is an implicit reference to an input value,
227243and its value is looked up from the _formatting context_ _input mapping_.
228244
245+ An implemementation MAY choose to wrap or otherwise represent all input values
246+ using the same representation it uses for all _resolved values_.
247+
229248The resolution of a _variable_ MAY fail if no value is identified for its _name_.
230249If this happens, an _Unresolved Variable_ error MUST be emitted.
231250If a _variable_ would resolve to a _fallback value_,
@@ -467,6 +486,23 @@ _Option_ _identifiers_ and values are not included in the _fallback value_.
467486
468487_Pattern selection_ is not supported for _fallback values_.
469488
489+ > For example, in a JavaScript formatter
490+ > the _fallback value_ could have the following implementation,
491+ > where `source` is one of the above-defined strings:
492+ >
493+ > ```ts
494+ > class MessageFallback implements MessageValue {
495+ > constructor(source: string) {
496+ > this.formatToString = () => `{${source}}`;
497+ > this.getValue = () => undefined;
498+ > }
499+ > resolvedOptions: () => ({});
500+ > selectKeys(_keys: string[]) {
501+ > throw Error("Selection on fallback values is not supported");
502+ > }
503+ > }
504+ > ```
505+
470506## Pattern Selection
471507
472508When a _message_ contains a _matcher_ with one or more _selectors_,
0 commit comments