diff --git a/packages/is-shallow-equal/index.js b/packages/is-shallow-equal/index.js index e52a593a18c4e4..924799d2a6d51a 100644 --- a/packages/is-shallow-equal/index.js +++ b/packages/is-shallow-equal/index.js @@ -8,12 +8,16 @@ var isShallowEqualArrays = require( './arrays' ); var isArray = Array.isArray; +/** + * @typedef {Record} ComparableObject + */ + /** * Returns true if the two arrays or objects are shallow equal, or false * otherwise. * - * @param {any[]|Object} a First object or array to compare. - * @param {any[]|Object} b Second object or array to compare. + * @param {any[]|ComparableObject} a First object or array to compare. + * @param {any[]|ComparableObject} b Second object or array to compare. * * @return {boolean} Whether the two values are shallow equal. */ diff --git a/packages/is-shallow-equal/objects.js b/packages/is-shallow-equal/objects.js index ebe1105b196156..2c7583aba9ce1d 100644 --- a/packages/is-shallow-equal/objects.js +++ b/packages/is-shallow-equal/objects.js @@ -5,8 +5,8 @@ var keys = Object.keys; /** * Returns true if the two objects are shallow equal, or false otherwise. * - * @param {Object} a First object to compare. - * @param {Object} b Second object to compare. + * @param {import('.').ComparableObject} a First object to compare. + * @param {import('.').ComparableObject} b Second object to compare. * * @return {boolean} Whether the two objects are shallow equal. */