2020-09-29 09:53:48 +02:00
|
|
|
declare namespace Intl {
|
|
|
|
type Locale = string;
|
|
|
|
type Locales = Locale[];
|
|
|
|
type Type = "conjunction" | "disjunction" | "unit";
|
|
|
|
type Style = "long" | "short" | "narrow";
|
|
|
|
type LocaleMatcher = "lookup" | "best fit";
|
|
|
|
interface ListFormatOptions {
|
|
|
|
type: Type;
|
|
|
|
style: Style;
|
|
|
|
localeMatcher: LocaleMatcher;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ListFormat {
|
2020-11-30 10:24:11 +01:00
|
|
|
constructor(
|
|
|
|
locales?: Locale | Locales | undefined,
|
|
|
|
options?: Partial<ListFormatOptions>
|
|
|
|
);
|
2020-09-29 09:53:48 +02:00
|
|
|
public format: (items: string[]) => string;
|
|
|
|
}
|
|
|
|
}
|