Skip to content

Commit 3584a6e

Browse files
committed
Update jsdoc-plugin
1 parent 93c1ccc commit 3584a6e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

jsdoc-plugin.cjs

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/*
2-
* Removes JSDoc comments with TypeScript import() declarations (used in index.js)
2+
* This plugin fixes unexpected JSDoc behavior that prevents us from using types that start with an at-sign (@).
3+
* JSDoc doesn't see "{@" as a valid type expression, probably as there's also {@link ...}.
34
*/
4-
5-
const IMPORT_PATTERN = /{(?:typeof )?import\(["'][^"']*["']\)[ .|}><,)=#\n]/;
6-
75
exports.handlers = {
86
jsdocCommentFound: function(e) {
9-
if (IMPORT_PATTERN.test(e.comment)) {
10-
e.comment = "";
11-
}
7+
e.comment = e.comment.replace(/{@ui5\//g, "{ @ui5/");
128
}
139
};

0 commit comments

Comments
 (0)