Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
allow undefined keys (but not for keys argument or return value of `u…
Browse files Browse the repository at this point in the history
…nionWith`)
  • Loading branch information
brettz9 committed Feb 6, 2022
1 parent caa7fec commit daee801
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 daee801

Please sign in to comment.