Skip to content

Commit a1f66cf

Browse files
committed
🥭 fix: jsdocSymbols() match declare keyword
1 parent 68e5e28 commit a1f66cf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "extra-javascript-text",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Utilities for processing JavaScript text.",
55
"main": "index.js",
66
"module": "index.mjs",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export function uncomment(txt: string, empty: boolean=false): string {
221221
// ------------
222222

223223
/** Regex for jsdoc and attached symbol: [jsdoc, export, default, kind, name]. */
224-
const RJSDOCSYMBOL = /(\/\*\*[\s\S]*?\*\/)(?:\s+(?:(export)\s+(?:(default)\s+)?)?(type|enum|interface|const|var|let|(?:async\s+)?function\*?|class)\s+([\w$]+))?/g;
224+
const RJSDOCSYMBOL = /(\/\*\*[\s\S]*?\*\/)(?:\s+(?:(export)\s+(?:(default)\s+)?)?(?:declare\s+)?(type|enum|interface|const|var|let|(?:async\s+)?function\*?|class)\s+([\w$]+))?/g;
225225

226226

227227
/**

0 commit comments

Comments
 (0)