mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix(docgen): strip dots from return types
This commit is contained in:
@@ -3,13 +3,16 @@ export function splitVarName(str: string) {
|
|||||||
let currGroup: string[] = [];
|
let currGroup: string[] = [];
|
||||||
let currStr = '';
|
let currStr = '';
|
||||||
|
|
||||||
const isASymbol = (char: string) => '-!$%^&*()_+|~=`{}[]:;<>?, '.includes(char);
|
const isASymbol = (char: string) => '-!$%^&*()_+|~=`{}[]:;<>?,. '.includes(char);
|
||||||
|
|
||||||
for (const char of str) {
|
for (const char of str) {
|
||||||
const currentlyInASymbolSection = isASymbol(currStr[0]!);
|
const currentlyInASymbolSection = isASymbol(currStr[0]!);
|
||||||
const charIsASymbol = isASymbol(char);
|
const charIsASymbol = isASymbol(char);
|
||||||
|
|
||||||
if (currStr.length && currentlyInASymbolSection !== charIsASymbol) {
|
if (currStr.length && currentlyInASymbolSection !== charIsASymbol) {
|
||||||
|
if (char === '.') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
currGroup.push(currStr);
|
currGroup.push(currStr);
|
||||||
currStr = char;
|
currStr = char;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user