1 | import { default as IntlRelativeTimeFormat } from '@formatjs/intl-relativetimeformat';
|
2 | import { SUPPORTED_FIELD, STYLE, LocaleData } from './types';
|
3 | declare global {
|
4 | namespace Intl {
|
5 | var RelativeTimeFormat: typeof IntlRelativeTimeFormat;
|
6 | }
|
7 | }
|
8 | export interface IntlRelativeFormatOptions {
|
9 | style?: STYLE;
|
10 | units?: SUPPORTED_FIELD;
|
11 | }
|
12 | interface IntlRelativeFormat {
|
13 | new (locales?: string | string[], opts?: IntlRelativeFormatOptions): IntlRelativeFormat;
|
14 | (locales?: string | string[], opts?: IntlRelativeFormatOptions): IntlRelativeFormat;
|
15 | thresholds: Record<string, number>;
|
16 | defaultLocale: string;
|
17 | __localeData__: Record<string, LocaleData>;
|
18 | __addLocaleData(...data: LocaleData[]): void;
|
19 | format(date: ConstructorParameters<typeof Date>[0], opts?: {
|
20 | now?: Date | number | null;
|
21 | }): string;
|
22 | resolvedOptions(): {
|
23 | locale: string;
|
24 | style: STYLE;
|
25 | units?: SUPPORTED_FIELD;
|
26 | };
|
27 | }
|
28 | declare const RelativeFormat: IntlRelativeFormat;
|
29 | export default RelativeFormat;
|