diff --git a/.eslintrc.json b/.eslintrc.json index 7bea33e..851ab42 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,6 +7,15 @@ "sourceType": "module", "ecmaVersion": 2020 }, + "settings": { + "jsdoc": { + "mode": "typescript", + "preferredTypes": { + "Object": "object", + "object<>": "Object" + } + } + }, "overrides": [ { "files": ["*.cjs"], diff --git a/lib/index.js b/lib/index.js index 747d024..93d22dc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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) { diff --git a/lib/visitor-keys.js b/lib/visitor-keys.js index c55d8f3..9b626dd 100644 --- a/lib/visitor-keys.js +++ b/lib/visitor-keys.js @@ -1,5 +1,5 @@ /** - * @type {{ readonly [type: string]: ReadonlyArray }} + * @type {{ readonly [type: string]: ReadonlyArray | undefined }} */ const KEYS = { AssignmentExpression: [