@typescript/native-preview-linux-arm 7.0.0-dev.20260302.1 → 7.0.0-dev.20260304.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.dom.d.ts +836 -14
- package/lib/lib.esnext.temporal.d.ts +33 -21
- package/lib/lib.webworker.d.ts +809 -17
- package/lib/tsgo +0 -0
- package/lib/tsgo.sig +7 -7
- package/package.json +2 -2
|
@@ -24,7 +24,7 @@ declare namespace Temporal {
|
|
|
24
24
|
type InstantLike = Instant | ZonedDateTime | string;
|
|
25
25
|
type PlainDateLike = PlainDate | ZonedDateTime | PlainDateTime | DateLikeObject | string;
|
|
26
26
|
type PlainDateTimeLike = PlainDateTime | ZonedDateTime | PlainDate | DateTimeLikeObject | string;
|
|
27
|
-
type PlainMonthDayLike = PlainMonthDay |
|
|
27
|
+
type PlainMonthDayLike = PlainMonthDay | DateLikeObject | string;
|
|
28
28
|
type PlainTimeLike = PlainTime | PlainDateTime | ZonedDateTime | TimeLikeObject | string;
|
|
29
29
|
type PlainYearMonthLike = PlainYearMonth | YearMonthLikeObject | string;
|
|
30
30
|
type TimeZoneLike = ZonedDateTime | string;
|
|
@@ -59,8 +59,6 @@ declare namespace Temporal {
|
|
|
59
59
|
nanoseconds?: number | undefined;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
interface MonthDayLikeObject extends Omit<DateLikeObject, "era" | "eraYear"> {}
|
|
63
|
-
|
|
64
62
|
interface TimeLikeObject {
|
|
65
63
|
hour?: number | undefined;
|
|
66
64
|
minute?: number | undefined;
|
|
@@ -77,8 +75,22 @@ declare namespace Temporal {
|
|
|
77
75
|
offset?: string | undefined;
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
type DateUnit = "year" | "month" | "week" | "day"
|
|
81
|
-
type TimeUnit = "hour" | "minute" | "second" | "millisecond" | "microsecond" | "nanosecond"
|
|
78
|
+
type DateUnit = "year" | "month" | "week" | "day";
|
|
79
|
+
type TimeUnit = "hour" | "minute" | "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
80
|
+
type PluralizeUnit<T extends DateUnit | TimeUnit> =
|
|
81
|
+
| T
|
|
82
|
+
| {
|
|
83
|
+
year: "years";
|
|
84
|
+
month: "months";
|
|
85
|
+
week: "weeks";
|
|
86
|
+
day: "days";
|
|
87
|
+
hour: "hours";
|
|
88
|
+
minute: "minutes";
|
|
89
|
+
second: "seconds";
|
|
90
|
+
millisecond: "milliseconds";
|
|
91
|
+
microsecond: "microseconds";
|
|
92
|
+
nanosecond: "nanoseconds";
|
|
93
|
+
}[T];
|
|
82
94
|
|
|
83
95
|
interface DisambiguationOptions {
|
|
84
96
|
disambiguation?: "compatible" | "earlier" | "later" | "reject" | undefined;
|
|
@@ -93,13 +105,13 @@ declare namespace Temporal {
|
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
interface RoundingOptions<Units extends DateUnit | TimeUnit> {
|
|
96
|
-
smallestUnit?: Units | undefined;
|
|
108
|
+
smallestUnit?: PluralizeUnit<Units> | undefined;
|
|
97
109
|
roundingIncrement?: number | undefined;
|
|
98
110
|
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
|
|
99
111
|
}
|
|
100
112
|
|
|
101
113
|
interface RoundingOptionsWithLargestUnit<Units extends DateUnit | TimeUnit> extends RoundingOptions<Units> {
|
|
102
|
-
largestUnit?: "auto" | Units | undefined;
|
|
114
|
+
largestUnit?: "auto" | PluralizeUnit<Units> | undefined;
|
|
103
115
|
}
|
|
104
116
|
|
|
105
117
|
interface ToStringRoundingOptions<Units extends DateUnit | TimeUnit> extends Pick<RoundingOptions<Units>, "smallestUnit" | "roundingMode"> {}
|
|
@@ -170,7 +182,7 @@ declare namespace Temporal {
|
|
|
170
182
|
}
|
|
171
183
|
var PlainDate: PlainDateConstructor;
|
|
172
184
|
|
|
173
|
-
interface PlainTimeToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour"
|
|
185
|
+
interface PlainTimeToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour">> {}
|
|
174
186
|
|
|
175
187
|
interface PlainTime {
|
|
176
188
|
readonly hour: number;
|
|
@@ -185,7 +197,7 @@ declare namespace Temporal {
|
|
|
185
197
|
until(other: PlainTimeLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
186
198
|
since(other: PlainTimeLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
187
199
|
equals(other: PlainTimeLike): boolean;
|
|
188
|
-
round(roundTo: TimeUnit): PlainTime;
|
|
200
|
+
round(roundTo: PluralizeUnit<TimeUnit>): PlainTime;
|
|
189
201
|
round(roundTo: RoundingOptions<TimeUnit>): PlainTime;
|
|
190
202
|
toString(options?: PlainTimeToStringOptions): string;
|
|
191
203
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -234,8 +246,8 @@ declare namespace Temporal {
|
|
|
234
246
|
subtract(duration: DurationLike, options?: OverflowOptions): PlainDateTime;
|
|
235
247
|
until(other: PlainDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
236
248
|
since(other: PlainDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
237
|
-
round(roundTo: "day" |
|
|
238
|
-
round(roundTo: RoundingOptions<"day" |
|
|
249
|
+
round(roundTo: PluralizeUnit<"day" | TimeUnit>): PlainDateTime;
|
|
250
|
+
round(roundTo: RoundingOptions<"day" | TimeUnit>): PlainDateTime;
|
|
239
251
|
equals(other: PlainDateTimeLike): boolean;
|
|
240
252
|
toString(options?: PlainDateTimeToStringOptions): string;
|
|
241
253
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -301,8 +313,8 @@ declare namespace Temporal {
|
|
|
301
313
|
subtract(duration: DurationLike, options?: OverflowOptions): ZonedDateTime;
|
|
302
314
|
until(other: ZonedDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
303
315
|
since(other: ZonedDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
304
|
-
round(roundTo: "day" |
|
|
305
|
-
round(roundTo: RoundingOptions<"day" |
|
|
316
|
+
round(roundTo: PluralizeUnit<"day" | TimeUnit>): ZonedDateTime;
|
|
317
|
+
round(roundTo: RoundingOptions<"day" | TimeUnit>): ZonedDateTime;
|
|
306
318
|
equals(other: ZonedDateTimeLike): boolean;
|
|
307
319
|
toString(options?: ZonedDateTimeToStringOptions): string;
|
|
308
320
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -332,10 +344,10 @@ declare namespace Temporal {
|
|
|
332
344
|
|
|
333
345
|
interface DurationRoundingOptions extends DurationRelativeToOptions, RoundingOptionsWithLargestUnit<DateUnit | TimeUnit> {}
|
|
334
346
|
|
|
335
|
-
interface DurationToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour" | "minute"
|
|
347
|
+
interface DurationToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour" | "minute">> {}
|
|
336
348
|
|
|
337
349
|
interface DurationTotalOptions extends DurationRelativeToOptions {
|
|
338
|
-
unit: DateUnit | TimeUnit
|
|
350
|
+
unit: PluralizeUnit<DateUnit | TimeUnit>;
|
|
339
351
|
}
|
|
340
352
|
|
|
341
353
|
interface Duration {
|
|
@@ -356,9 +368,9 @@ declare namespace Temporal {
|
|
|
356
368
|
abs(): Duration;
|
|
357
369
|
add(other: DurationLike): Duration;
|
|
358
370
|
subtract(other: DurationLike): Duration;
|
|
359
|
-
round(roundTo: "day" |
|
|
371
|
+
round(roundTo: PluralizeUnit<"day" | TimeUnit>): Duration;
|
|
360
372
|
round(roundTo: DurationRoundingOptions): Duration;
|
|
361
|
-
total(totalOf: "day" |
|
|
373
|
+
total(totalOf: PluralizeUnit<"day" | TimeUnit>): number;
|
|
362
374
|
total(totalOf: DurationTotalOptions): number;
|
|
363
375
|
toString(options?: DurationToStringOptions): string;
|
|
364
376
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DurationFormatOptions): string;
|
|
@@ -386,7 +398,7 @@ declare namespace Temporal {
|
|
|
386
398
|
subtract(duration: DurationLike): Instant;
|
|
387
399
|
until(other: InstantLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
388
400
|
since(other: InstantLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
389
|
-
round(roundTo: TimeUnit): Instant;
|
|
401
|
+
round(roundTo: PluralizeUnit<TimeUnit>): Instant;
|
|
390
402
|
round(roundTo: RoundingOptions<TimeUnit>): Instant;
|
|
391
403
|
equals(other: InstantLike): boolean;
|
|
392
404
|
toString(options?: InstantToStringOptions): string;
|
|
@@ -425,8 +437,8 @@ declare namespace Temporal {
|
|
|
425
437
|
with(yearMonthLike: PartialTemporalLike<YearMonthLikeObject>, options?: OverflowOptions): PlainYearMonth;
|
|
426
438
|
add(duration: DurationLike, options?: OverflowOptions): PlainYearMonth;
|
|
427
439
|
subtract(duration: DurationLike, options?: OverflowOptions): PlainYearMonth;
|
|
428
|
-
until(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<"year" | "month"
|
|
429
|
-
since(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<"year" | "month"
|
|
440
|
+
until(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<"year" | "month">): Duration;
|
|
441
|
+
since(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<"year" | "month">): Duration;
|
|
430
442
|
equals(other: PlainYearMonthLike): boolean;
|
|
431
443
|
toString(options?: PlainDateToStringOptions): string;
|
|
432
444
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -454,7 +466,7 @@ declare namespace Temporal {
|
|
|
454
466
|
readonly calendarId: string;
|
|
455
467
|
readonly monthCode: string;
|
|
456
468
|
readonly day: number;
|
|
457
|
-
with(monthDayLike: PartialTemporalLike<
|
|
469
|
+
with(monthDayLike: PartialTemporalLike<DateLikeObject>, options?: OverflowOptions): PlainMonthDay;
|
|
458
470
|
equals(other: PlainMonthDayLike): boolean;
|
|
459
471
|
toString(options?: PlainDateToStringOptions): string;
|
|
460
472
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|