Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/is-shallow-equal/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* Returns true if the two arrays are shallow equal, or false otherwise.
*
* @param {Array} a First array to compare.
* @param {Array} b Second array to compare.
* @param {any[]} a First array to compare.
* @param {any[]} b Second array to compare.
*
* @return {boolean} Whether the two arrays are shallow equal.
*/
Expand Down
8 changes: 6 additions & 2 deletions packages/is-shallow-equal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ var isShallowEqualArrays = require( './arrays' );

var isArray = Array.isArray;

/**
* @typedef {{[key: string]: any}} ComparableObject
*/

/**
* Returns true if the two arrays or objects are shallow equal, or false
* otherwise.
*
* @param {(Array|Object)} a First object or array to compare.
* @param {(Array|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.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/is-shallow-equal/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"include": [
"./packages/i18n/**/*.js",
"./packages/is-shallow-equal/**/*.js",
"./packages/priority-queue/**/*.js",
"./packages/token-list/**/*.js",
"./packages/url/**/*.js"
Expand Down