Skip to content

Commit 66fdc76

Browse files
authored
Collapse ecmascript.ts container. (#57)
* Collapse ecmapscript container object and export individual functions instead.
1 parent 62ff777 commit 66fdc76

16 files changed

+3981
-3821
lines changed

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ export namespace Temporal {
814814
one: Temporal.PlainDate | PlainDateLike | string,
815815
two: Temporal.PlainDate | PlainDateLike | string
816816
): ComparisonResult;
817-
constructor(isoYear: number, isoMonth: number, isoDay: number, calendar?: CalendarProtocol);
817+
constructor(isoYear: number, isoMonth: number, isoDay: number, calendar?: CalendarProtocol | string);
818818
readonly era: string | undefined;
819819
readonly eraYear: number | undefined;
820820
readonly year: number;
@@ -937,7 +937,7 @@ export namespace Temporal {
937937
millisecond?: number,
938938
microsecond?: number,
939939
nanosecond?: number,
940-
calendar?: CalendarProtocol
940+
calendar?: CalendarProtocol | string
941941
);
942942
readonly era: string | undefined;
943943
readonly eraYear: number | undefined;

lib/calendar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DEBUG } from './debug';
2-
import { ES } from './ecmascript';
2+
import * as ES from './ecmascript';
33
import { GetIntrinsic, MakeIntrinsicClass, DefineIntrinsic } from './intrinsicclass';
44
import {
55
CALENDAR_ID,

lib/duration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DEBUG } from './debug';
2-
import { ES } from './ecmascript';
2+
import * as ES from './ecmascript';
33
import { MakeIntrinsicClass } from './intrinsicclass';
44
import {
55
YEARS,
@@ -389,7 +389,7 @@ export class Duration implements Temporal.Duration {
389389

390390
if (options === undefined) throw new TypeError('options argument is required');
391391
options = ES.GetOptionsObject(options);
392-
const unit = ES.ToTemporalDurationTotalUnit(options, undefined);
392+
const unit = ES.ToTemporalDurationTotalUnit(options);
393393
if (unit === undefined) throw new RangeError('unit option is required');
394394
const relativeTo = ES.ToRelativeTemporalObject(options);
395395

0 commit comments

Comments
 (0)