toDisplayString falls back to String(obj) for primitives; no way to apply alignment/number format like object branch.
Location: src/displayable.mts:103
Code:
// XXX Shouldn't we allow number formatting specifiers?
return String(obj);
Possible approach: Plumb DisplayOptions (or a narrowed number format) into the primitive path, reusing the same mini-language as format() / amount formatters where appropriate.
toDisplayStringfalls back toString(obj)for primitives; no way to apply alignment/number format like object branch.Location:
src/displayable.mts:103Code:
Possible approach: Plumb
DisplayOptions(or a narrowed number format) into the primitive path, reusing the same mini-language asformat()/ amount formatters where appropriate.