Closed Constellation closed 1 year ago
Conclusion: RangeError, strings only.
We also need to change the following test to sync with it. @romulocintra
intl402/DurationFormat/prototype/formatToParts/invalid-arguments-throws.js
intl402/DurationFormat/prototype/format/invalid-arguments-throws.js
We will integrate Temporal duration related changes in the future, and it will change the current format function's TypeError to RangeError. So, how about making it
RangeError
from the beginning? I think the rationale is that, "Intl.Duration#format can format Duration described as a String in a particular syntax, but in this spec, no syntax is accepted, so it is always throwing a RangeError".