fix(docgen): strip dots from return types

This commit is contained in:
iCrawl
2022-06-09 20:47:51 +02:00
parent 16810f3e41
commit d7b8357dcb

View File

@@ -3,13 +3,16 @@ export function splitVarName(str: string) {
let currGroup: string[] = [];
let currStr = '';
const isASymbol = (char: string) => '-!$%^&*()_+|~=`{}[]:;<>?, '.includes(char);
const isASymbol = (char: string) => '-!$%^&*()_+|~=`{}[]:;<>?,. '.includes(char);
for (const char of str) {
const currentlyInASymbolSection = isASymbol(currStr[0]!);
const charIsASymbol = isASymbol(char);
if (currStr.length && currentlyInASymbolSection !== charIsASymbol) {
if (char === '.') {
continue;
}
currGroup.push(currStr);
currStr = char;