Skip to content

Commit f0f415b

Browse files
authored
Add missing Intl.ListFormat.prototype.resolvedOptions() (#51024)
* Add missing Intl.ListFormat.prototype.resolvedOptions() Fixes #51023 * lint
1 parent a3dbe7d commit f0f415b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/lib/es2021.intl.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ declare namespace Intl {
6565
style?: ListFormatStyle | undefined;
6666
}
6767

68+
interface ResolvedListFormatOptions {
69+
locale: string;
70+
style: ListFormatStyle;
71+
type: ListFormatType;
72+
}
73+
6874
interface ListFormat {
6975
/**
7076
* Returns a string with a language-specific representation of the list.
@@ -91,6 +97,15 @@ declare namespace Intl {
9197
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
9298
*/
9399
formatToParts(list: Iterable<string>): { type: "element" | "literal", value: string; }[];
100+
101+
/**
102+
* Returns a new object with properties reflecting the locale and style
103+
* formatting options computed during the construction of the current
104+
* `Intl.ListFormat` object.
105+
*
106+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
107+
*/
108+
resolvedOptions(): ResolvedListFormatOptions;
94109
}
95110

96111
const ListFormat: {

0 commit comments

Comments
 (0)