Skip to content

Commit ca43d7a

Browse files
committed
remove implicit coercion test
1 parent fdb0bc2 commit ca43d7a

File tree

5 files changed

+1518
-1554
lines changed

5 files changed

+1518
-1554
lines changed

tests/baselines/reference/temporal.errors.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
temporal.ts(25,13): error TS2339: Property 'year' does not exist on type 'Instant'.
2-
temporal.ts(72,54): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'number'.
3-
temporal.ts(1503,8): error TS2339: Property 'month' does not exist on type 'PlainMonthDay'.
4-
temporal.ts(1513,8): error TS2339: Property 'month' does not exist on type 'PlainMonthDay'.
5-
temporal.ts(1519,8): error TS2339: Property 'month' does not exist on type 'PlainMonthDay'.
2+
temporal.ts(1502,8): error TS2339: Property 'month' does not exist on type 'PlainMonthDay'.
3+
temporal.ts(1512,8): error TS2339: Property 'month' does not exist on type 'PlainMonthDay'.
4+
temporal.ts(1518,8): error TS2339: Property 'month' does not exist on type 'PlainMonthDay'.
65

76

8-
==== temporal.ts (5 errors) ====
7+
==== temporal.ts (4 errors) ====
98
/**
109
* Test cases derived from documentation at tc39/proposal-temporal,
1110
* under the following license:
@@ -79,9 +78,6 @@ temporal.ts(1519,8): error TS2339: Property 'month' does not exist on type 'Plai
7978
const legacyDate = new Date("1995-12-17T03:24Z");
8079
let instant: Temporal.Instant;
8180
instant = Temporal.Instant.fromEpochMilliseconds(legacyDate.getTime()); // => 1995-12-17T03:24:00Z
82-
instant = Temporal.Instant.fromEpochMilliseconds(legacyDate); // valueOf() called implicitly
83-
~~~~~~~~~~
84-
!!! error TS2345: Argument of type 'Date' is not assignable to parameter of type 'number'.
8581
instant = legacyDate.toTemporalInstant(); // recommended
8682
}
8783

tests/baselines/reference/temporal.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
const legacyDate = new Date("1995-12-17T03:24Z");
7373
let instant: Temporal.Instant;
7474
instant = Temporal.Instant.fromEpochMilliseconds(legacyDate.getTime()); // => 1995-12-17T03:24:00Z
75-
instant = Temporal.Instant.fromEpochMilliseconds(legacyDate); // valueOf() called implicitly
7675
instant = legacyDate.toTemporalInstant(); // recommended
7776
}
7877

@@ -1886,7 +1885,6 @@
18861885
const legacyDate = new Date("1995-12-17T03:24Z");
18871886
let instant;
18881887
instant = Temporal.Instant.fromEpochMilliseconds(legacyDate.getTime()); // => 1995-12-17T03:24:00Z
1889-
instant = Temporal.Instant.fromEpochMilliseconds(legacyDate); // valueOf() called implicitly
18901888
instant = legacyDate.toTemporalInstant(); // recommended
18911889
}
18921890
{

0 commit comments

Comments
 (0)