mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
docs: add missing @category
tags (#22411)
Fixes the stray, uncategorised symbols seen in the left pane menu on https://deno.land/api@v1.40.4.
This commit is contained in:
parent
012a9d8aeb
commit
66baff763f
2 changed files with 86 additions and 0 deletions
1
cli/tsc/dts/lib.deno.ns.d.ts
vendored
1
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -6271,6 +6271,7 @@ declare namespace Deno {
|
||||||
handler: ServeHandler;
|
handler: ServeHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category HTTP Server */
|
||||||
export interface ServeUnixOptions {
|
export interface ServeUnixOptions {
|
||||||
/** The unix domain socket path to listen on. */
|
/** The unix domain socket path to listen on. */
|
||||||
path: string;
|
path: string;
|
||||||
|
|
85
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
85
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -1972,6 +1972,7 @@ declare namespace Deno {
|
||||||
display_id?: string;
|
display_id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Jupyter */
|
||||||
type VegaObject = {
|
type VegaObject = {
|
||||||
$schema: string;
|
$schema: string;
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
|
@ -2242,6 +2243,11 @@ declare var WebSocketStream: {
|
||||||
|
|
||||||
// Adapted from `tc39/proposal-temporal`: https://github.com/tc39/proposal-temporal/blob/main/polyfill/index.d.ts
|
// Adapted from `tc39/proposal-temporal`: https://github.com/tc39/proposal-temporal/blob/main/polyfill/index.d.ts
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [Specification](https://tc39.es/proposal-temporal/docs/index.html)
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
|
*/
|
||||||
declare namespace Temporal {
|
declare namespace Temporal {
|
||||||
export type ComparisonResult = -1 | 0 | 1;
|
export type ComparisonResult = -1 | 0 | 1;
|
||||||
export type RoundingMode =
|
export type RoundingMode =
|
||||||
|
@ -2258,6 +2264,8 @@ declare namespace Temporal {
|
||||||
/**
|
/**
|
||||||
* Options for assigning fields using `with()` or entire objects with
|
* Options for assigning fields using `with()` or entire objects with
|
||||||
* `from()`.
|
* `from()`.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type AssignmentOptions = {
|
export type AssignmentOptions = {
|
||||||
/**
|
/**
|
||||||
|
@ -2277,6 +2285,8 @@ declare namespace Temporal {
|
||||||
* Options for assigning fields using `Duration.prototype.with()` or entire
|
* Options for assigning fields using `Duration.prototype.with()` or entire
|
||||||
* objects with `Duration.from()`, and for arithmetic with
|
* objects with `Duration.from()`, and for arithmetic with
|
||||||
* `Duration.prototype.add()` and `Duration.prototype.subtract()`.
|
* `Duration.prototype.add()` and `Duration.prototype.subtract()`.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type DurationOptions = {
|
export type DurationOptions = {
|
||||||
/**
|
/**
|
||||||
|
@ -2294,6 +2304,8 @@ declare namespace Temporal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for conversions of `Temporal.PlainDateTime` to `Temporal.Instant`
|
* Options for conversions of `Temporal.PlainDateTime` to `Temporal.Instant`
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type ToInstantOptions = {
|
export type ToInstantOptions = {
|
||||||
/**
|
/**
|
||||||
|
@ -2321,6 +2333,7 @@ declare namespace Temporal {
|
||||||
disambiguation?: "compatible" | "earlier" | "later" | "reject";
|
disambiguation?: "compatible" | "earlier" | "later" | "reject";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
type OffsetDisambiguationOptions = {
|
type OffsetDisambiguationOptions = {
|
||||||
/**
|
/**
|
||||||
* Time zone definitions can change. If an application stores data about
|
* Time zone definitions can change. If an application stores data about
|
||||||
|
@ -2357,12 +2370,15 @@ declare namespace Temporal {
|
||||||
offset?: "use" | "prefer" | "ignore" | "reject";
|
offset?: "use" | "prefer" | "ignore" | "reject";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type ZonedDateTimeAssignmentOptions = Partial<
|
export type ZonedDateTimeAssignmentOptions = Partial<
|
||||||
AssignmentOptions & ToInstantOptions & OffsetDisambiguationOptions
|
AssignmentOptions & ToInstantOptions & OffsetDisambiguationOptions
|
||||||
>;
|
>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for arithmetic operations like `add()` and `subtract()`
|
* Options for arithmetic operations like `add()` and `subtract()`
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type ArithmeticOptions = {
|
export type ArithmeticOptions = {
|
||||||
/**
|
/**
|
||||||
|
@ -2376,7 +2392,9 @@ declare namespace Temporal {
|
||||||
overflow?: "constrain" | "reject";
|
overflow?: "constrain" | "reject";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type DateUnit = "year" | "month" | "week" | "day";
|
export type DateUnit = "year" | "month" | "week" | "day";
|
||||||
|
/** @category Temporal */
|
||||||
export type TimeUnit =
|
export type TimeUnit =
|
||||||
| "hour"
|
| "hour"
|
||||||
| "minute"
|
| "minute"
|
||||||
|
@ -2384,12 +2402,15 @@ declare namespace Temporal {
|
||||||
| "millisecond"
|
| "millisecond"
|
||||||
| "microsecond"
|
| "microsecond"
|
||||||
| "nanosecond";
|
| "nanosecond";
|
||||||
|
/** @category Temporal */
|
||||||
export type DateTimeUnit = DateUnit | TimeUnit;
|
export type DateTimeUnit = DateUnit | TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the name of a unit is provided to a Temporal API as a string, it is
|
* When the name of a unit is provided to a Temporal API as a string, it is
|
||||||
* usually singular, e.g. 'day' or 'hour'. But plural unit names like 'days'
|
* usually singular, e.g. 'day' or 'hour'. But plural unit names like 'days'
|
||||||
* or 'hours' are aso accepted too.
|
* or 'hours' are aso accepted too.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type PluralUnit<T extends DateTimeUnit> = {
|
export type PluralUnit<T extends DateTimeUnit> = {
|
||||||
year: "years";
|
year: "years";
|
||||||
|
@ -2404,12 +2425,17 @@ declare namespace Temporal {
|
||||||
nanosecond: "nanoseconds";
|
nanosecond: "nanoseconds";
|
||||||
}[T];
|
}[T];
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type LargestUnit<T extends DateTimeUnit> = "auto" | T | PluralUnit<T>;
|
export type LargestUnit<T extends DateTimeUnit> = "auto" | T | PluralUnit<T>;
|
||||||
|
/** @category Temporal */
|
||||||
export type SmallestUnit<T extends DateTimeUnit> = T | PluralUnit<T>;
|
export type SmallestUnit<T extends DateTimeUnit> = T | PluralUnit<T>;
|
||||||
|
/** @category Temporal */
|
||||||
export type TotalUnit<T extends DateTimeUnit> = T | PluralUnit<T>;
|
export type TotalUnit<T extends DateTimeUnit> = T | PluralUnit<T>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for outputting precision in toString() on types with seconds
|
* Options for outputting precision in toString() on types with seconds
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type ToStringPrecisionOptions = {
|
export type ToStringPrecisionOptions = {
|
||||||
fractionalSecondDigits?: "auto" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
fractionalSecondDigits?: "auto" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
||||||
|
@ -2434,14 +2460,17 @@ declare namespace Temporal {
|
||||||
roundingMode?: RoundingMode;
|
roundingMode?: RoundingMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type ShowCalendarOption = {
|
export type ShowCalendarOption = {
|
||||||
calendarName?: "auto" | "always" | "never" | "critical";
|
calendarName?: "auto" | "always" | "never" | "critical";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type CalendarTypeToStringOptions = Partial<
|
export type CalendarTypeToStringOptions = Partial<
|
||||||
ToStringPrecisionOptions & ShowCalendarOption
|
ToStringPrecisionOptions & ShowCalendarOption
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type ZonedDateTimeToStringOptions = Partial<
|
export type ZonedDateTimeToStringOptions = Partial<
|
||||||
CalendarTypeToStringOptions & {
|
CalendarTypeToStringOptions & {
|
||||||
timeZoneName?: "auto" | "never" | "critical";
|
timeZoneName?: "auto" | "never" | "critical";
|
||||||
|
@ -2449,6 +2478,7 @@ declare namespace Temporal {
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type InstantToStringOptions = Partial<
|
export type InstantToStringOptions = Partial<
|
||||||
ToStringPrecisionOptions & {
|
ToStringPrecisionOptions & {
|
||||||
timeZone: TimeZoneLike;
|
timeZone: TimeZoneLike;
|
||||||
|
@ -2458,6 +2488,8 @@ declare namespace Temporal {
|
||||||
/**
|
/**
|
||||||
* Options to control the result of `until()` and `since()` methods in
|
* Options to control the result of `until()` and `since()` methods in
|
||||||
* `Temporal` types.
|
* `Temporal` types.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export interface DifferenceOptions<T extends DateTimeUnit> {
|
export interface DifferenceOptions<T extends DateTimeUnit> {
|
||||||
/**
|
/**
|
||||||
|
@ -2518,6 +2550,8 @@ declare namespace Temporal {
|
||||||
* object is provided, its `smallestUnit` property is required while other
|
* object is provided, its `smallestUnit` property is required while other
|
||||||
* properties are optional. A string is treated the same as an object whose
|
* properties are optional. A string is treated the same as an object whose
|
||||||
* `smallestUnit` property value is that string.
|
* `smallestUnit` property value is that string.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type RoundTo<T extends DateTimeUnit> =
|
export type RoundTo<T extends DateTimeUnit> =
|
||||||
| SmallestUnit<T>
|
| SmallestUnit<T>
|
||||||
|
@ -2561,6 +2595,8 @@ declare namespace Temporal {
|
||||||
* `smallestUnit` and/or `largestUnit` property is required, while other
|
* `smallestUnit` and/or `largestUnit` property is required, while other
|
||||||
* properties are optional. A string parameter is treated the same as an
|
* properties are optional. A string parameter is treated the same as an
|
||||||
* object whose `smallestUnit` property value is that string.
|
* object whose `smallestUnit` property value is that string.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type DurationRoundTo =
|
export type DurationRoundTo =
|
||||||
| SmallestUnit<DateTimeUnit>
|
| SmallestUnit<DateTimeUnit>
|
||||||
|
@ -2689,6 +2725,8 @@ declare namespace Temporal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options to control behavior of `Duration.prototype.total()`
|
* Options to control behavior of `Duration.prototype.total()`
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type DurationTotalOf =
|
export type DurationTotalOf =
|
||||||
| TotalUnit<DateTimeUnit>
|
| TotalUnit<DateTimeUnit>
|
||||||
|
@ -2731,6 +2769,8 @@ declare namespace Temporal {
|
||||||
/**
|
/**
|
||||||
* Options to control behavior of `Duration.compare()`, `Duration.add()`, and
|
* Options to control behavior of `Duration.compare()`, `Duration.add()`, and
|
||||||
* `Duration.subtract()`
|
* `Duration.subtract()`
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export interface DurationArithmeticOptions {
|
export interface DurationArithmeticOptions {
|
||||||
/**
|
/**
|
||||||
|
@ -2761,6 +2801,7 @@ declare namespace Temporal {
|
||||||
| string;
|
| string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type DurationLike = {
|
export type DurationLike = {
|
||||||
years?: number;
|
years?: number;
|
||||||
months?: number;
|
months?: number;
|
||||||
|
@ -2779,6 +2820,8 @@ declare namespace Temporal {
|
||||||
* used in date/time arithmetic.
|
* used in date/time arithmetic.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/duration.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/duration.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class Duration {
|
export class Duration {
|
||||||
static from(
|
static from(
|
||||||
|
@ -2849,6 +2892,8 @@ declare namespace Temporal {
|
||||||
* time zone offset such as '2020-01-23T17:04:36.491865121-08:00'.
|
* time zone offset such as '2020-01-23T17:04:36.491865121-08:00'.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/instant.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/instant.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class Instant {
|
export class Instant {
|
||||||
static fromEpochSeconds(epochSeconds: number): Temporal.Instant;
|
static fromEpochSeconds(epochSeconds: number): Temporal.Instant;
|
||||||
|
@ -2928,14 +2973,18 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.Instant";
|
readonly [Symbol.toStringTag]: "Temporal.Instant";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
type YearOrEraAndEraYear = { era: string; eraYear: number } | {
|
type YearOrEraAndEraYear = { era: string; eraYear: number } | {
|
||||||
year: number;
|
year: number;
|
||||||
};
|
};
|
||||||
|
/** @category Temporal */
|
||||||
type MonthCodeOrMonthAndYear = (YearOrEraAndEraYear & { month: number }) | {
|
type MonthCodeOrMonthAndYear = (YearOrEraAndEraYear & { month: number }) | {
|
||||||
monthCode: string;
|
monthCode: string;
|
||||||
};
|
};
|
||||||
|
/** @category Temporal */
|
||||||
type MonthOrMonthCode = { month: number } | { monthCode: string };
|
type MonthOrMonthCode = { month: number } | { monthCode: string };
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export interface CalendarProtocol {
|
export interface CalendarProtocol {
|
||||||
id: string;
|
id: string;
|
||||||
year(
|
year(
|
||||||
|
@ -3086,6 +3135,8 @@ declare namespace Temporal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Any of these types can be passed to Temporal methods instead of a Temporal.Calendar.
|
* Any of these types can be passed to Temporal methods instead of a Temporal.Calendar.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type CalendarLike =
|
export type CalendarLike =
|
||||||
| string
|
| string
|
||||||
|
@ -3103,6 +3154,8 @@ declare namespace Temporal {
|
||||||
* that calendar system.
|
* that calendar system.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/calendar.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/calendar.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class Calendar implements CalendarProtocol {
|
export class Calendar implements CalendarProtocol {
|
||||||
static from(item: CalendarLike): Temporal.Calendar | CalendarProtocol;
|
static from(item: CalendarLike): Temporal.Calendar | CalendarProtocol;
|
||||||
|
@ -3255,6 +3308,7 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.Calendar";
|
readonly [Symbol.toStringTag]: "Temporal.Calendar";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type PlainDateLike = {
|
export type PlainDateLike = {
|
||||||
era?: string | undefined;
|
era?: string | undefined;
|
||||||
eraYear?: number | undefined;
|
eraYear?: number | undefined;
|
||||||
|
@ -3265,6 +3319,7 @@ declare namespace Temporal {
|
||||||
calendar?: CalendarLike;
|
calendar?: CalendarLike;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
type PlainDateISOFields = {
|
type PlainDateISOFields = {
|
||||||
isoYear: number;
|
isoYear: number;
|
||||||
isoMonth: number;
|
isoMonth: number;
|
||||||
|
@ -3280,6 +3335,8 @@ declare namespace Temporal {
|
||||||
* in.
|
* in.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/date.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/date.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class PlainDate {
|
export class PlainDate {
|
||||||
static from(
|
static from(
|
||||||
|
@ -3360,6 +3417,7 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.PlainDate";
|
readonly [Symbol.toStringTag]: "Temporal.PlainDate";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type PlainDateTimeLike = {
|
export type PlainDateTimeLike = {
|
||||||
era?: string | undefined;
|
era?: string | undefined;
|
||||||
eraYear?: number | undefined;
|
eraYear?: number | undefined;
|
||||||
|
@ -3376,6 +3434,7 @@ declare namespace Temporal {
|
||||||
calendar?: CalendarLike;
|
calendar?: CalendarLike;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
type PlainDateTimeISOFields = {
|
type PlainDateTimeISOFields = {
|
||||||
isoYear: number;
|
isoYear: number;
|
||||||
isoMonth: number;
|
isoMonth: number;
|
||||||
|
@ -3398,6 +3457,8 @@ declare namespace Temporal {
|
||||||
* complete information is not required.
|
* complete information is not required.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/datetime.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/datetime.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class PlainDateTime {
|
export class PlainDateTime {
|
||||||
static from(
|
static from(
|
||||||
|
@ -3523,6 +3584,7 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.PlainDateTime";
|
readonly [Symbol.toStringTag]: "Temporal.PlainDateTime";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type PlainMonthDayLike = {
|
export type PlainMonthDayLike = {
|
||||||
era?: string | undefined;
|
era?: string | undefined;
|
||||||
eraYear?: number | undefined;
|
eraYear?: number | undefined;
|
||||||
|
@ -3539,6 +3601,8 @@ declare namespace Temporal {
|
||||||
* recurring event, like "Bastille Day is on the 14th of July."
|
* recurring event, like "Bastille Day is on the 14th of July."
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/monthday.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/monthday.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class PlainMonthDay {
|
export class PlainMonthDay {
|
||||||
static from(
|
static from(
|
||||||
|
@ -3572,6 +3636,7 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.PlainMonthDay";
|
readonly [Symbol.toStringTag]: "Temporal.PlainMonthDay";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type PlainTimeLike = {
|
export type PlainTimeLike = {
|
||||||
hour?: number;
|
hour?: number;
|
||||||
minute?: number;
|
minute?: number;
|
||||||
|
@ -3581,6 +3646,7 @@ declare namespace Temporal {
|
||||||
nanosecond?: number;
|
nanosecond?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
type PlainTimeISOFields = {
|
type PlainTimeISOFields = {
|
||||||
isoHour: number;
|
isoHour: number;
|
||||||
isoMinute: number;
|
isoMinute: number;
|
||||||
|
@ -3604,6 +3670,8 @@ declare namespace Temporal {
|
||||||
* `toPlainDateTime()` method.
|
* `toPlainDateTime()` method.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/time.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/time.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class PlainTime {
|
export class PlainTime {
|
||||||
static from(
|
static from(
|
||||||
|
@ -3693,6 +3761,8 @@ declare namespace Temporal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A plain object implementing the protocol for a custom time zone.
|
* A plain object implementing the protocol for a custom time zone.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export interface TimeZoneProtocol {
|
export interface TimeZoneProtocol {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -3721,6 +3791,8 @@ declare namespace Temporal {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Any of these types can be passed to Temporal methods instead of a Temporal.TimeZone.
|
* Any of these types can be passed to Temporal methods instead of a Temporal.TimeZone.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export type TimeZoneLike = string | TimeZoneProtocol | ZonedDateTime;
|
export type TimeZoneLike = string | TimeZoneProtocol | ZonedDateTime;
|
||||||
|
|
||||||
|
@ -3737,6 +3809,8 @@ declare namespace Temporal {
|
||||||
* required to convert between them.
|
* required to convert between them.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/timezone.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/timezone.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class TimeZone implements TimeZoneProtocol {
|
export class TimeZone implements TimeZoneProtocol {
|
||||||
static from(timeZone: TimeZoneLike): Temporal.TimeZone | TimeZoneProtocol;
|
static from(timeZone: TimeZoneLike): Temporal.TimeZone | TimeZoneProtocol;
|
||||||
|
@ -3767,6 +3841,7 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.TimeZone";
|
readonly [Symbol.toStringTag]: "Temporal.TimeZone";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type PlainYearMonthLike = {
|
export type PlainYearMonthLike = {
|
||||||
era?: string | undefined;
|
era?: string | undefined;
|
||||||
eraYear?: number | undefined;
|
eraYear?: number | undefined;
|
||||||
|
@ -3782,6 +3857,8 @@ declare namespace Temporal {
|
||||||
* recurring event, like "the June 2019 meeting".
|
* recurring event, like "the June 2019 meeting".
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/yearmonth.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/yearmonth.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export class PlainYearMonth {
|
export class PlainYearMonth {
|
||||||
static from(
|
static from(
|
||||||
|
@ -3844,6 +3921,7 @@ declare namespace Temporal {
|
||||||
readonly [Symbol.toStringTag]: "Temporal.PlainYearMonth";
|
readonly [Symbol.toStringTag]: "Temporal.PlainYearMonth";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export type ZonedDateTimeLike = {
|
export type ZonedDateTimeLike = {
|
||||||
era?: string | undefined;
|
era?: string | undefined;
|
||||||
eraYear?: number | undefined;
|
eraYear?: number | undefined;
|
||||||
|
@ -3862,6 +3940,7 @@ declare namespace Temporal {
|
||||||
calendar?: CalendarLike;
|
calendar?: CalendarLike;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
type ZonedDateTimeISOFields = {
|
type ZonedDateTimeISOFields = {
|
||||||
isoYear: number;
|
isoYear: number;
|
||||||
isoMonth: number;
|
isoMonth: number;
|
||||||
|
@ -3877,6 +3956,7 @@ declare namespace Temporal {
|
||||||
calendar: string | CalendarProtocol;
|
calendar: string | CalendarProtocol;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @category Temporal */
|
||||||
export class ZonedDateTime {
|
export class ZonedDateTime {
|
||||||
static from(
|
static from(
|
||||||
item: Temporal.ZonedDateTime | ZonedDateTimeLike | string,
|
item: Temporal.ZonedDateTime | ZonedDateTimeLike | string,
|
||||||
|
@ -4008,6 +4088,8 @@ declare namespace Temporal {
|
||||||
* the current date, time, and time zone.
|
* the current date, time, and time zone.
|
||||||
*
|
*
|
||||||
* See https://tc39.es/proposal-temporal/docs/now.html for more details.
|
* See https://tc39.es/proposal-temporal/docs/now.html for more details.
|
||||||
|
*
|
||||||
|
* @category Temporal
|
||||||
*/
|
*/
|
||||||
export const Now: {
|
export const Now: {
|
||||||
/**
|
/**
|
||||||
|
@ -4161,6 +4243,7 @@ declare namespace Temporal {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Intl */
|
||||||
declare namespace Intl {
|
declare namespace Intl {
|
||||||
type Formattable =
|
type Formattable =
|
||||||
| Date
|
| Date
|
||||||
|
@ -4176,6 +4259,7 @@ declare namespace Intl {
|
||||||
source: "shared" | "startRange" | "endRange";
|
source: "shared" | "startRange" | "endRange";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Intl */
|
||||||
export interface DateTimeFormat {
|
export interface DateTimeFormat {
|
||||||
/**
|
/**
|
||||||
* Format a date into a string according to the locale and formatting
|
* Format a date into a string according to the locale and formatting
|
||||||
|
@ -4224,6 +4308,7 @@ declare namespace Intl {
|
||||||
): DateTimeFormatRangePart[];
|
): DateTimeFormatRangePart[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @category Intl */
|
||||||
export interface DateTimeFormatOptions {
|
export interface DateTimeFormatOptions {
|
||||||
// TODO: remove the props below after TS lib declarations are updated
|
// TODO: remove the props below after TS lib declarations are updated
|
||||||
dayPeriod?: "narrow" | "short" | "long";
|
dayPeriod?: "narrow" | "short" | "long";
|
||||||
|
|
Loading…
Reference in a new issue