mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add missing Intl.ListFormat.prototype.resolvedOptions() (#51024)
* Add missing Intl.ListFormat.prototype.resolvedOptions() Fixes #51023 * lint
This commit is contained in:
parent
a3dbe7dc70
commit
f0f415b671
15
src/lib/es2021.intl.d.ts
vendored
15
src/lib/es2021.intl.d.ts
vendored
@ -65,6 +65,12 @@ declare namespace Intl {
|
||||
style?: ListFormatStyle | undefined;
|
||||
}
|
||||
|
||||
interface ResolvedListFormatOptions {
|
||||
locale: string;
|
||||
style: ListFormatStyle;
|
||||
type: ListFormatType;
|
||||
}
|
||||
|
||||
interface ListFormat {
|
||||
/**
|
||||
* Returns a string with a language-specific representation of the list.
|
||||
@ -91,6 +97,15 @@ declare namespace Intl {
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
||||
*/
|
||||
formatToParts(list: Iterable<string>): { type: "element" | "literal", value: string; }[];
|
||||
|
||||
/**
|
||||
* Returns a new object with properties reflecting the locale and style
|
||||
* formatting options computed during the construction of the current
|
||||
* `Intl.ListFormat` object.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
|
||||
*/
|
||||
resolvedOptions(): ResolvedListFormatOptions;
|
||||
}
|
||||
|
||||
const ListFormat: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user