react-intl 3.9.1 → 3.9.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [3.9.2](https://github.com/formatjs/react-intl/compare/v3.9.1...v3.9.2) (2019-12-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add type overload for formatList, fix [#1537](https://github.com/formatjs/react-intl/issues/1537) ([6629899](https://github.com/formatjs/react-intl/commit/662989973c8d08f7972a3ba75f70b19abc507bb9))
11
+ * fix list formatter generation types ([0e5f205](https://github.com/formatjs/react-intl/commit/0e5f2058d7cba2d886693e219f58366582f0a6ac))
12
+
5
13
  ### [3.9.1](https://github.com/formatjs/react-intl/compare/v3.9.0...v3.9.1) (2019-12-02)
6
14
 
7
15
 
@@ -1,3 +1,2 @@
1
- import * as React from 'react';
2
1
  import { IntlConfig, Formatters, IntlFormatters } from '../types';
3
- export declare function formatList({ locale, onError }: Pick<IntlConfig, 'locale' | 'onError'>, getListFormat: Formatters['getListFormat'], values: Parameters<IntlFormatters['formatList']>[0], options?: Parameters<IntlFormatters['formatList']>[1]): string | React.ReactNode;
2
+ export declare function formatList({ locale, onError }: Pick<IntlConfig, 'locale' | 'onError'>, getListFormat: Formatters['getListFormat'], values: Array<string>, options: Parameters<IntlFormatters['formatList']>[1]): string;
@@ -245,6 +245,8 @@ export interface IntlFormatters {
245
245
  // (undocumented)
246
246
  formatHTMLMessage(descriptor: MessageDescriptor, values?: Record<string, PrimitiveType>): React.ReactNode;
247
247
  // (undocumented)
248
+ formatList(values: Array<string>, opts?: FormatListOptions): string;
249
+ // (undocumented)
248
250
  formatList(values: Array<string | React.ReactNode>, opts?: FormatListOptions): React.ReactNode;
249
251
  // (undocumented)
250
252
  formatMessage(descriptor: MessageDescriptor, values?: Record<string, PrimitiveType>): string;
@@ -212,6 +212,7 @@ export declare interface IntlFormatters {
212
212
  formatMessage(descriptor: MessageDescriptor, values?: Record<string, PrimitiveType>): string;
213
213
  formatMessage(descriptor: MessageDescriptor, values?: Record<string, PrimitiveType | React.ReactElement | FormatXMLElementFn>): string | React.ReactNodeArray;
214
214
  formatHTMLMessage(descriptor: MessageDescriptor, values?: Record<string, PrimitiveType>): React.ReactNode;
215
+ formatList(values: Array<string>, opts?: FormatListOptions): string;
215
216
  formatList(values: Array<string | React.ReactNode>, opts?: FormatListOptions): React.ReactNode;
216
217
  }
217
218
 
@@ -5037,7 +5037,7 @@
5037
5037
  for (var i = 0; i < len; i++) {
5038
5038
  var key = aKeys[i];
5039
5039
 
5040
- if (objA[key] !== objB[key]) {
5040
+ if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
5041
5041
  return false;
5042
5042
  }
5043
5043
  }