Skip to content

Commit 0e5f205

Browse files
longlhoLong Ho
authored and
Long Ho
committed
fix: fix list formatter generation types
1 parent ef1739c commit 0e5f205

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/formatters/list.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ function generateToken(i: number): string {
1515
return `${now}_${i}_${now}`;
1616
}
1717

18+
export function formatList(
19+
{locale, onError}: Pick<IntlConfig, 'locale' | 'onError'>,
20+
getListFormat: Formatters['getListFormat'],
21+
values: Array<string>,
22+
options: Parameters<IntlFormatters['formatList']>[1]
23+
): string
1824
export function formatList(
1925
{locale, onError}: Pick<IntlConfig, 'locale' | 'onError'>,
2026
getListFormat: Formatters['getListFormat'],
2127
values: Parameters<IntlFormatters['formatList']>[0],
2228
options: Parameters<IntlFormatters['formatList']>[1] = {}
23-
): string | React.ReactNode {
29+
): React.ReactNode {
2430
const ListFormat: typeof IntlListFormat = (Intl as any).ListFormat;
2531
if (!ListFormat) {
2632
onError(

0 commit comments

Comments
 (0)