mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Add missing source property to Intl formatRangeToParts methods (#48754)
This commit is contained in:
6
src/lib/es2021.intl.d.ts
vendored
6
src/lib/es2021.intl.d.ts
vendored
@@ -8,9 +8,13 @@ declare namespace Intl {
|
||||
fractionalSecondDigits?: 0 | 1 | 2 | 3 | undefined;
|
||||
}
|
||||
|
||||
interface DateTimeRangeFormatPart extends DateTimeFormatPart {
|
||||
source: "startRange" | "endRange" | "shared"
|
||||
}
|
||||
|
||||
interface DateTimeFormat {
|
||||
formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string;
|
||||
formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeFormatPart[];
|
||||
formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[];
|
||||
}
|
||||
|
||||
interface ResolvedDateTimeFormatOptions {
|
||||
|
||||
6
src/lib/esnext.intl.d.ts
vendored
6
src/lib/esnext.intl.d.ts
vendored
@@ -1,6 +1,10 @@
|
||||
declare namespace Intl {
|
||||
interface NumberRangeFormatPart extends NumberFormatPart {
|
||||
source: "startRange" | "endRange" | "shared"
|
||||
}
|
||||
|
||||
interface NumberFormat {
|
||||
formatRange(start: number | bigint, end: number | bigint): string;
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberFormatPart[];
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ new Intl.DateTimeFormat().formatRange
|
||||
>formatRange : (startDate: number | bigint | Date, endDate: number | bigint | Date) => string
|
||||
|
||||
new Intl.DateTimeFormat().formatRangeToParts
|
||||
>new Intl.DateTimeFormat().formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeFormatPart[]
|
||||
>new Intl.DateTimeFormat().formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeRangeFormatPart[]
|
||||
>new Intl.DateTimeFormat() : Intl.DateTimeFormat
|
||||
>Intl.DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions): string[]; readonly prototype: Intl.DateTimeFormat; }
|
||||
>Intl : typeof Intl
|
||||
>DateTimeFormat : { (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; new (locales?: string | string[], options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions): string[]; readonly prototype: Intl.DateTimeFormat; }
|
||||
>formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeFormatPart[]
|
||||
>formatRangeToParts : (startDate: number | bigint | Date, endDate: number | bigint | Date) => Intl.DateTimeRangeFormatPart[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user