diff --git a/src/generators/legacy-json/utils/parseSignature.mjs b/src/generators/legacy-json/utils/parseSignature.mjs index 95af8b22..403db96b 100644 --- a/src/generators/legacy-json/utils/parseSignature.mjs +++ b/src/generators/legacy-json/utils/parseSignature.mjs @@ -2,14 +2,14 @@ import { PARAM_EXPRESSION } from '../constants.mjs'; -const OPTIONAL_LEVEL_CHANGES = { '[': 1, ']': -1, ' ': 0 }; +const OPTIONAL_LEVEL_CHANGES = { '[': 1, ']': -1 }; /** - * @param {String} char * @param {Number} depth + * @param {String} char * @returns {Number} */ -const updateDepth = (char, depth) => +const updateDepth = (depth, char) => depth + (OPTIONAL_LEVEL_CHANGES[char] || 0); /**