typescript 6.0.0-dev.20260225 → 6.0.0-dev.20260227
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/_tsc.js +1 -1
- package/lib/lib.esnext.temporal.d.ts +31 -17
- package/lib/typescript.js +1 -1
- package/package.json +2 -2
package/lib/_tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "6.0";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20260227`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -75,8 +75,22 @@ declare namespace Temporal {
|
|
|
75
75
|
offset?: string | undefined;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
type DateUnit = "year" | "month" | "week" | "day"
|
|
79
|
-
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];
|
|
80
94
|
|
|
81
95
|
interface DisambiguationOptions {
|
|
82
96
|
disambiguation?: "compatible" | "earlier" | "later" | "reject" | undefined;
|
|
@@ -91,13 +105,13 @@ declare namespace Temporal {
|
|
|
91
105
|
}
|
|
92
106
|
|
|
93
107
|
interface RoundingOptions<Units extends DateUnit | TimeUnit> {
|
|
94
|
-
smallestUnit?: Units | undefined;
|
|
108
|
+
smallestUnit?: PluralizeUnit<Units> | undefined;
|
|
95
109
|
roundingIncrement?: number | undefined;
|
|
96
110
|
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
|
|
97
111
|
}
|
|
98
112
|
|
|
99
113
|
interface RoundingOptionsWithLargestUnit<Units extends DateUnit | TimeUnit> extends RoundingOptions<Units> {
|
|
100
|
-
largestUnit?: "auto" | Units | undefined;
|
|
114
|
+
largestUnit?: "auto" | PluralizeUnit<Units> | undefined;
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
interface ToStringRoundingOptions<Units extends DateUnit | TimeUnit> extends Pick<RoundingOptions<Units>, "smallestUnit" | "roundingMode"> {}
|
|
@@ -168,7 +182,7 @@ declare namespace Temporal {
|
|
|
168
182
|
}
|
|
169
183
|
var PlainDate: PlainDateConstructor;
|
|
170
184
|
|
|
171
|
-
interface PlainTimeToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour"
|
|
185
|
+
interface PlainTimeToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour">> {}
|
|
172
186
|
|
|
173
187
|
interface PlainTime {
|
|
174
188
|
readonly hour: number;
|
|
@@ -183,7 +197,7 @@ declare namespace Temporal {
|
|
|
183
197
|
until(other: PlainTimeLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
184
198
|
since(other: PlainTimeLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
185
199
|
equals(other: PlainTimeLike): boolean;
|
|
186
|
-
round(roundTo: TimeUnit): PlainTime;
|
|
200
|
+
round(roundTo: PluralizeUnit<TimeUnit>): PlainTime;
|
|
187
201
|
round(roundTo: RoundingOptions<TimeUnit>): PlainTime;
|
|
188
202
|
toString(options?: PlainTimeToStringOptions): string;
|
|
189
203
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -232,8 +246,8 @@ declare namespace Temporal {
|
|
|
232
246
|
subtract(duration: DurationLike, options?: OverflowOptions): PlainDateTime;
|
|
233
247
|
until(other: PlainDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
234
248
|
since(other: PlainDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
235
|
-
round(roundTo: "day" |
|
|
236
|
-
round(roundTo: RoundingOptions<"day" |
|
|
249
|
+
round(roundTo: PluralizeUnit<"day" | TimeUnit>): PlainDateTime;
|
|
250
|
+
round(roundTo: RoundingOptions<"day" | TimeUnit>): PlainDateTime;
|
|
237
251
|
equals(other: PlainDateTimeLike): boolean;
|
|
238
252
|
toString(options?: PlainDateTimeToStringOptions): string;
|
|
239
253
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -299,8 +313,8 @@ declare namespace Temporal {
|
|
|
299
313
|
subtract(duration: DurationLike, options?: OverflowOptions): ZonedDateTime;
|
|
300
314
|
until(other: ZonedDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
301
315
|
since(other: ZonedDateTimeLike, options?: RoundingOptionsWithLargestUnit<DateUnit | TimeUnit>): Duration;
|
|
302
|
-
round(roundTo: "day" |
|
|
303
|
-
round(roundTo: RoundingOptions<"day" |
|
|
316
|
+
round(roundTo: PluralizeUnit<"day" | TimeUnit>): ZonedDateTime;
|
|
317
|
+
round(roundTo: RoundingOptions<"day" | TimeUnit>): ZonedDateTime;
|
|
304
318
|
equals(other: ZonedDateTimeLike): boolean;
|
|
305
319
|
toString(options?: ZonedDateTimeToStringOptions): string;
|
|
306
320
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
@@ -330,10 +344,10 @@ declare namespace Temporal {
|
|
|
330
344
|
|
|
331
345
|
interface DurationRoundingOptions extends DurationRelativeToOptions, RoundingOptionsWithLargestUnit<DateUnit | TimeUnit> {}
|
|
332
346
|
|
|
333
|
-
interface DurationToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour" | "minute"
|
|
347
|
+
interface DurationToStringOptions extends ToStringRoundingOptionsWithFractionalSeconds<Exclude<TimeUnit, "hour" | "minute">> {}
|
|
334
348
|
|
|
335
349
|
interface DurationTotalOptions extends DurationRelativeToOptions {
|
|
336
|
-
unit: DateUnit | TimeUnit
|
|
350
|
+
unit: PluralizeUnit<DateUnit | TimeUnit>;
|
|
337
351
|
}
|
|
338
352
|
|
|
339
353
|
interface Duration {
|
|
@@ -354,9 +368,9 @@ declare namespace Temporal {
|
|
|
354
368
|
abs(): Duration;
|
|
355
369
|
add(other: DurationLike): Duration;
|
|
356
370
|
subtract(other: DurationLike): Duration;
|
|
357
|
-
round(roundTo: "day" |
|
|
371
|
+
round(roundTo: PluralizeUnit<"day" | TimeUnit>): Duration;
|
|
358
372
|
round(roundTo: DurationRoundingOptions): Duration;
|
|
359
|
-
total(totalOf: "day" |
|
|
373
|
+
total(totalOf: PluralizeUnit<"day" | TimeUnit>): number;
|
|
360
374
|
total(totalOf: DurationTotalOptions): number;
|
|
361
375
|
toString(options?: DurationToStringOptions): string;
|
|
362
376
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DurationFormatOptions): string;
|
|
@@ -384,7 +398,7 @@ declare namespace Temporal {
|
|
|
384
398
|
subtract(duration: DurationLike): Instant;
|
|
385
399
|
until(other: InstantLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
386
400
|
since(other: InstantLike, options?: RoundingOptionsWithLargestUnit<TimeUnit>): Duration;
|
|
387
|
-
round(roundTo: TimeUnit): Instant;
|
|
401
|
+
round(roundTo: PluralizeUnit<TimeUnit>): Instant;
|
|
388
402
|
round(roundTo: RoundingOptions<TimeUnit>): Instant;
|
|
389
403
|
equals(other: InstantLike): boolean;
|
|
390
404
|
toString(options?: InstantToStringOptions): string;
|
|
@@ -423,8 +437,8 @@ declare namespace Temporal {
|
|
|
423
437
|
with(yearMonthLike: PartialTemporalLike<YearMonthLikeObject>, options?: OverflowOptions): PlainYearMonth;
|
|
424
438
|
add(duration: DurationLike, options?: OverflowOptions): PlainYearMonth;
|
|
425
439
|
subtract(duration: DurationLike, options?: OverflowOptions): PlainYearMonth;
|
|
426
|
-
until(other: PlainYearMonthLike, options?: RoundingOptionsWithLargestUnit<"year" | "month"
|
|
427
|
-
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;
|
|
428
442
|
equals(other: PlainYearMonthLike): boolean;
|
|
429
443
|
toString(options?: PlainDateToStringOptions): string;
|
|
430
444
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
package/lib/typescript.js
CHANGED
|
@@ -2289,7 +2289,7 @@ module.exports = __toCommonJS(typescript_exports);
|
|
|
2289
2289
|
|
|
2290
2290
|
// src/compiler/corePublic.ts
|
|
2291
2291
|
var versionMajorMinor = "6.0";
|
|
2292
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2292
|
+
var version = `${versionMajorMinor}.0-dev.20260227`;
|
|
2293
2293
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2294
2294
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2295
2295
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "6.0.0-dev.
|
|
5
|
+
"version": "6.0.0-dev.20260227",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "6cf81701bc9666957064dad013e938c9c5af2c33"
|
|
119
119
|
}
|