generated from tc39/template-for-proposals
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
As it stands, the Amount proposal reads internal slots in calls to ToIntlMathematicalValue, which happens when we use Intl.NumberFormat to format an Amount. We thus end up consulting internal slots of an argument of a function, which is problematic for membrance transparency.
How shall we do this? I see two paths forward:
- Ensure that
ToIntlMathematicalValueends up working with a String version of the underlying Amount - Checking for
.fractionDigitsand.unitproperties (not internal slots)
(1) would work by changing step 1 ofToIntlMathematicalValue so that the call to ToNumber receive a ~string~ hint rather than a ~number~ hint. This aligns nicely with the work going on in proposal-intl-keep-trailing-zeros.
Option 2 also seems fine. It feels like it aligns well with how Intl.NF(.p.format) works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels