From bf77220fd7173d5cce21a3e5d9525981bc73279d Mon Sep 17 00:00:00 2001 From: lysdexic-audio Date: Tue, 25 Apr 2023 14:51:50 +1000 Subject: [PATCH] Regex replace paren notation with dot notation for types --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 4d8309e..08583c9 100644 --- a/index.js +++ b/index.js @@ -224,6 +224,7 @@ function jsdocCommentFound(e) { if (!typeDefsSet) return; e.comment = e.comment.replace(typeRegex, (typeExpr) => { + typeExpr = typeExpr.replace(/\[["'](.*)['"]\]/g, ".$1"); return typeExpr.replace(identifiers, (identifier) => { return (fileInfo.moduleId && typeDefsSet.has(identifier)) ? `module:${fileInfo.moduleId}~${identifier}` :