diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-09-11 06:36:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 21:36:43 +0000 |
commit | e522f4b65a3439030506733b104498f21422ede0 (patch) | |
tree | fdc344f8c28aefe387d5c8048e01d0a2240bc8e5 /tests/specs/run/unstable_temporal_api_patch | |
parent | a69b1e699ef76568a4a3da47939134abda545ec7 (diff) |
BREAKING(temporal/unstable): Remove obsoleted Temporal APIs part 2 (#25505)
Mainly I removed `Temporal.Calendar` and `Temporal.TimeZone` and
replaced them to APIs that handle calendar and timezone as strings.
https://github.com/tc39/proposal-temporal/pull/2925
Related #24836
Diffstat (limited to 'tests/specs/run/unstable_temporal_api_patch')
-rw-r--r-- | tests/specs/run/unstable_temporal_api_patch/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/run/unstable_temporal_api_patch/main.out | 7 | ||||
-rw-r--r-- | tests/specs/run/unstable_temporal_api_patch/main.ts | 11 |
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/specs/run/unstable_temporal_api_patch/__test__.jsonc b/tests/specs/run/unstable_temporal_api_patch/__test__.jsonc new file mode 100644 index 000000000..b5b12ed26 --- /dev/null +++ b/tests/specs/run/unstable_temporal_api_patch/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run --no-config --unstable-temporal --check main.ts", + "output": "main.out", + "exitCode": 0 +} diff --git a/tests/specs/run/unstable_temporal_api_patch/main.out b/tests/specs/run/unstable_temporal_api_patch/main.out new file mode 100644 index 000000000..a17d3a9e2 --- /dev/null +++ b/tests/specs/run/unstable_temporal_api_patch/main.out @@ -0,0 +1,7 @@ +Check [WILDCARD] +[WILDCARD] +undefined +iso8601 +UTC +undefined +undefined diff --git a/tests/specs/run/unstable_temporal_api_patch/main.ts b/tests/specs/run/unstable_temporal_api_patch/main.ts new file mode 100644 index 000000000..6a4078053 --- /dev/null +++ b/tests/specs/run/unstable_temporal_api_patch/main.ts @@ -0,0 +1,11 @@ +console.log(Temporal.Now.timeZoneId()); +// @ts-expect-error: undefined check +console.log(Temporal.Now.timeZone); + +const zoned = new Temporal.ZonedDateTime(0n, "UTC"); +console.log(zoned.calendarId); +console.log(zoned.timeZoneId); +// @ts-expect-error: undefined check +console.log(zoned.calendar); +// @ts-expect-error: undefined check +console.log(zoned.timeZone); |