react-intl 7.1.10 → 7.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import FormattedPlural from './src/components/plural';
9
9
  import IntlProvider from './src/components/provider';
10
10
  import FormattedRelativeTime from './src/components/relative';
11
11
  import useIntl from './src/components/useIntl';
12
+ import { IntlShape } from './src/types';
12
13
  export { createIntlCache, CustomFormatConfig, CustomFormats, FormatDateOptions, FormatDisplayNameOptions, FormatListOptions, FormatNumberOptions, FormatPluralOptions, FormatRelativeTimeOptions, Formatters, IntlCache, IntlFormatters, InvalidConfigError, MessageDescriptor, MessageFormatError, MissingDataError, MissingTranslationError, IntlError as ReactIntlError, IntlErrorCode as ReactIntlErrorCode, UnsupportedFormatterError, } from '@formatjs/intl';
13
14
  export { IntlConfig, IntlShape, ResolvedIntlConfig } from './src/types';
14
15
  export { createIntl, FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, injectIntl, IntlContext, IntlProvider, RawIntlProvider, useIntl, WithIntlProps, WrappedComponentProps, };
@@ -23,7 +24,7 @@ export declare const FormattedTime: React.FC<Intl.DateTimeFormatOptions & Custom
23
24
  children?(formattedTime: string): React.ReactElement | null;
24
25
  }>;
25
26
  export declare const FormattedNumber: React.FC<Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'> & {
26
- value: number;
27
+ value: Parameters<IntlShape['formatNumber']>[0];
27
28
  children?(formattedNumber: string): React.ReactElement | null;
28
29
  }>;
29
30
  export declare const FormattedList: React.FC<Intl.ListFormatOptions & {
package/lib/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import FormattedPlural from './src/components/plural';
9
9
  import IntlProvider from './src/components/provider';
10
10
  import FormattedRelativeTime from './src/components/relative';
11
11
  import useIntl from './src/components/useIntl';
12
+ import { IntlShape } from './src/types';
12
13
  export { createIntlCache, CustomFormatConfig, CustomFormats, FormatDateOptions, FormatDisplayNameOptions, FormatListOptions, FormatNumberOptions, FormatPluralOptions, FormatRelativeTimeOptions, Formatters, IntlCache, IntlFormatters, InvalidConfigError, MessageDescriptor, MessageFormatError, MissingDataError, MissingTranslationError, IntlError as ReactIntlError, IntlErrorCode as ReactIntlErrorCode, UnsupportedFormatterError, } from '@formatjs/intl';
13
14
  export { IntlConfig, IntlShape, ResolvedIntlConfig } from './src/types';
14
15
  export { createIntl, FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, injectIntl, IntlContext, IntlProvider, RawIntlProvider, useIntl, WithIntlProps, WrappedComponentProps, };
@@ -23,7 +24,7 @@ export declare const FormattedTime: React.FC<Intl.DateTimeFormatOptions & Custom
23
24
  children?(formattedTime: string): React.ReactElement | null;
24
25
  }>;
25
26
  export declare const FormattedNumber: React.FC<Omit<NumberFormatOptions, 'localeMatcher'> & CustomFormatConfig<'number'> & {
26
- value: number;
27
+ value: Parameters<IntlShape['formatNumber']>[0];
27
28
  children?(formattedNumber: string): React.ReactElement | null;
28
29
  }>;
29
30
  export declare const FormattedList: React.FC<Intl.ListFormatOptions & {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-intl",
3
3
  "description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",
4
- "version": "7.1.10",
4
+ "version": "7.1.11",
5
5
  "license": "BSD-3-Clause",
6
6
  "author": "Eric Ferraiuolo <edf@ericf.me>",
7
7
  "sideEffects": false,
@@ -12,9 +12,9 @@
12
12
  "hoist-non-react-statics": "^3.3.2",
13
13
  "tslib": "^2.8.0",
14
14
  "intl-messageformat": "10.7.16",
15
- "@formatjs/ecma402-abstract": "2.3.4",
16
15
  "@formatjs/icu-messageformat-parser": "2.11.2",
17
- "@formatjs/intl": "3.1.6"
16
+ "@formatjs/intl": "3.1.6",
17
+ "@formatjs/ecma402-abstract": "2.3.4"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": "16 || 17 || 18 || 19",