-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Add lib.esnext.temporal #62628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add lib.esnext.temporal #62628
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /// <reference lib="esnext.temporal" /> | ||
|
|
||
| interface Date { | ||
| toTemporalInstant(): Temporal.Instant; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,12 @@ | ||
| /// <reference lib="esnext.temporal" /> | ||
|
|
||
| declare namespace Intl { | ||
| // Empty | ||
| type FormattableTemporalObject = Temporal.PlainDate | Temporal.PlainYearMonth | Temporal.PlainMonthDay | Temporal.PlainTime | Temporal.PlainDateTime | Temporal.Instant; | ||
|
|
||
| interface DateTimeFormat { | ||
| format(date?: FormattableTemporalObject | Date | number): string; | ||
| formatToParts(date?: FormattableTemporalObject | Date | number): DateTimeFormatPart[]; | ||
| formatRange(startDate: FormattableTemporalObject | Date | number, endDate: FormattableTemporalObject | Date | number): string; | ||
| formatRangeToParts(startDate: FormattableTemporalObject | Date | number, endDate: FormattableTemporalObject | Date | number): DateTimeRangeFormatPart[]; | ||
| } | ||
| } | ||
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intlcomes beforetemporalin the libs list. I am not sure if we have cases where earlier libs reference later ones, though maybe that does nothing.I am not sure if this matters, or in which file it makes sense to declare these...