chore: fix docs roll for functions without args

This commit is contained in:
Max Schmitt 2024-02-27 14:46:57 +01:00
parent 1c8e8bea7e
commit f6ccaefd35

View file

@ -737,7 +737,8 @@ function parseTypeExpression(type) {
if (type[i] === '(') { if (type[i] === '(') {
name = type.substring(0, i); name = type.substring(0, i);
const matching = matchingBracket(type.substring(i), '(', ')'); const matching = matchingBracket(type.substring(i), '(', ')');
args = parseTypeExpression(type.substring(i + 1, i + matching - 1)); const argsString = type.substring(i + 1, i + matching - 1);
args = argsString ? parseTypeExpression(argsString) : null;
i = i + matching; i = i + matching;
if (type[i] === ':') { if (type[i] === ':') {
retType = parseTypeExpression(type.substring(i + 1)); retType = parseTypeExpression(type.substring(i + 1));