Skip to content

Commit

Permalink
refactor: allow undefined keys (but not for keys argument or return v…
Browse files Browse the repository at this point in the history
…alue of `unionWith`)
  • Loading branch information
brettz9 committed Feb 6, 2022
1 parent caa7fec commit 354f720
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
"sourceType": "module",
"ecmaVersion": 2020
},
"settings": {
"jsdoc": {
"mode": "typescript",
"preferredTypes": {
"Object": "object",
"object<>": "Object"
}
}
},
"overrides": [
{
"files": ["*.cjs"],
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function filterKey(key) {

/**
* Get visitor keys of a given node.
* @param {Object} node The AST node to get keys.
* @param {object} node The AST node to get keys.
* @returns {readonly string[]} Visitor keys of the node.
*/
export function getKeys(node) {
Expand Down
2 changes: 1 addition & 1 deletion lib/visitor-keys.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @type {{ readonly [type: string]: ReadonlyArray<string> }}
* @type {{ readonly [type: string]: ReadonlyArray<string> | undefined }}
*/
const KEYS = {
AssignmentExpression: [
Expand Down

0 comments on commit 354f720

Please sign in to comment.