We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
legacy-json
1 parent 385f0c3 commit 5d380a0Copy full SHA for 5d380a0
1 file changed
src/generators/legacy-json/utils/parseSignature.mjs
@@ -2,14 +2,14 @@
2
3
import { PARAM_EXPRESSION } from '../constants.mjs';
4
5
-const OPTIONAL_LEVEL_CHANGES = { '[': 1, ']': -1, ' ': 0 };
+const OPTIONAL_LEVEL_CHANGES = { '[': 1, ']': -1 };
6
7
/**
8
- * @param {String} char
9
* @param {Number} depth
+ * @param {String} char
10
* @returns {Number}
11
*/
12
-const updateDepth = (char, depth) =>
+const updateDepth = (depth, char) =>
13
depth + (OPTIONAL_LEVEL_CHANGES[char] || 0);
14
15
0 commit comments