Skip to content

Commit e454171

Browse files
linusgptomato
authored andcommitted
Editorial: Use consistent wording for throwing on undefined NewTarget
1 parent 2512852 commit e454171

File tree

7 files changed

+7
-14
lines changed

7 files changed

+7
-14
lines changed

spec/duration.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ <h1>The Temporal.Duration Constructor</h1>
3434
<h1>Temporal.Duration ( [ _years_ [ , _months_ [ , _weeks_ [ , _days_ [ , _hours_ [ , _minutes_ [ , _seconds_ [ , _milliseconds_ [ , _microseconds_ [ , _nanoseconds_ ] ] ] ] ] ] ] ] ] ] )</h1>
3535
<p>The `Temporal.Duration` function performs the following steps when called:</p>
3636
<emu-alg>
37-
1. If NewTarget is *undefined*, then
38-
1. Throw a *TypeError* exception.
37+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3938
1. If _years_ is *undefined*, let _y_ be 0; else let _y_ be ? ToIntegerIfIntegral(_years_).
4039
1. If _months_ is *undefined*, let _mo_ be 0; else let _mo_ be ? ToIntegerIfIntegral(_months_).
4140
1. If _weeks_ is *undefined*, let _w_ be 0; else let _w_ be ? ToIntegerIfIntegral(_weeks_).

spec/instant.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ <h1>The Temporal.Instant Constructor</h1>
2727
<h1>Temporal.Instant ( _epochNanoseconds_ )</h1>
2828
<p>This function performs the following steps when called:</p>
2929
<emu-alg>
30-
1. If NewTarget is *undefined*, then
31-
1. Throw a *TypeError* exception.
30+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3231
1. Let _epochNanoseconds_ be ? ToBigInt(_epochNanoseconds_).
3332
1. If IsValidEpochNanoseconds(_epochNanoseconds_) is *false*, throw a *RangeError* exception.
3433
1. Return ? CreateTemporalInstant(_epochNanoseconds_, NewTarget).

spec/plaindatetime.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ <h1>The Temporal.PlainDateTime Constructor</h1>
2727
<h1>Temporal.PlainDateTime ( _isoYear_, _isoMonth_, _isoDay_ [ , _hour_ [ , _minute_ [ , _second_ [ , _millisecond_ [ , _microsecond_ [ , _nanosecond_ [ , _calendar_ ] ] ] ] ] ] ] )</h1>
2828
<p>This function performs the following steps when called:</p>
2929
<emu-alg>
30-
1. If NewTarget is *undefined*, then
31-
1. Throw a *TypeError* exception.
30+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3231
1. Set _isoYear_ to ? ToIntegerWithTruncation(_isoYear_).
3332
1. Set _isoMonth_ to ? ToIntegerWithTruncation(_isoMonth_).
3433
1. Set _isoDay_ to ? ToIntegerWithTruncation(_isoDay_).

spec/plainmonthday.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ <h1>The Temporal.PlainMonthDay Constructor</h1>
2727
<h1>Temporal.PlainMonthDay ( _isoMonth_, _isoDay_ [ , _calendar_ [ , _referenceISOYear_ ] ] )</h1>
2828
<p>This function performs the following steps when called:</p>
2929
<emu-alg>
30-
1. If NewTarget is *undefined*, then
31-
1. Throw a *TypeError* exception.
30+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3231
1. If _referenceISOYear_ is *undefined*, then
3332
1. Set _referenceISOYear_ to *1972*<sub>𝔽</sub> (the first ISO 8601 leap year after the epoch).
3433
1. Let _m_ be ? ToIntegerWithTruncation(_isoMonth_).

spec/plaintime.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ <h1>The Temporal.PlainTime Constructor</h1>
3030
<h1>Temporal.PlainTime ( [ _hour_ [ , _minute_ [ , _second_ [ , _millisecond_ [ , _microsecond_ [ , _nanosecond_ ] ] ] ] ] ] )</h1>
3131
<p>This function performs the following steps when called:</p>
3232
<emu-alg>
33-
1. If NewTarget is *undefined*, then
34-
1. Throw a *TypeError* exception.
33+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3534
1. If _hour_ is *undefined*, set _hour_ to 0; else set _hour_ to ? ToIntegerWithTruncation(_hour_).
3635
1. If _minute_ is *undefined*, set _minute_ to 0; else set _minute_ to ? ToIntegerWithTruncation(_minute_).
3736
1. If _second_ is *undefined*, set _second_ to 0; else set _second_ to ? ToIntegerWithTruncation(_second_).

spec/plainyearmonth.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ <h1>The Temporal.PlainYearMonth Constructor</h1>
2727
<h1>Temporal.PlainYearMonth ( _isoYear_, _isoMonth_ [ , _calendar_ [ , _referenceISODay_ ] ] )</h1>
2828
<p>This function performs the following steps when called:</p>
2929
<emu-alg>
30-
1. If NewTarget is *undefined*, then
31-
1. Throw a *TypeError* exception.
30+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3231
1. If _referenceISODay_ is *undefined*, then
3332
1. Set _referenceISODay_ to *1*<sub>𝔽</sub>.
3433
1. Let _y_ be ? ToIntegerWithTruncation(_isoYear_).

spec/zoneddatetime.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ <h1>The Temporal.ZonedDateTime Constructor</h1>
2727
<h1>Temporal.ZonedDateTime ( _epochNanoseconds_, _timeZone_ [ , _calendar_ ] )</h1>
2828
<p>This function performs the following steps when called:</p>
2929
<emu-alg>
30-
1. If NewTarget is *undefined*, then
31-
1. Throw a *TypeError* exception.
30+
1. If NewTarget is *undefined*, throw a *TypeError* exception.
3231
1. Set _epochNanoseconds_ to ? ToBigInt(_epochNanoseconds_).
3332
1. If IsValidEpochNanoseconds(_epochNanoseconds_) is *false*, throw a *RangeError* exception.
3433
1. If _timeZone_ is not a String, throw a *TypeError* exception.

0 commit comments

Comments
 (0)