Skip to content

Commit 5f00672

Browse files
authored
fix(getJsdocComment, iterateJsdoc): fix CJS type declarations (#1493)
1 parent c29757d commit 5f00672

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/getJsdocProcessorPlugin.cts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import {getJsdocProcessorPlugin} from './getJsdocProcessorPlugin.js';
22

3-
exports.getJsdocProcessorPlugin = getJsdocProcessorPlugin;
3+
export = {
4+
getJsdocProcessorPlugin: getJsdocProcessorPlugin as typeof getJsdocProcessorPlugin
5+
};

src/iterateJsdoc.cts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import iterateJsdoc, {getSettings, parseComment} from './iterateJsdoc.js';
1+
import iterateJsdoc, {getSettings, parseComment, type JsdocVisitor, type RuleConfig} from './iterateJsdoc.js';
22

3-
export = iterateJsdoc;
3+
const exp = iterateJsdoc as ((iterator: JsdocVisitor, ruleConfig: RuleConfig) => import('eslint').Rule.RuleModule) & {
4+
getSettings: typeof getSettings,
5+
parseComment: typeof parseComment
6+
};
47

5-
exports.getSettings = getSettings;
6-
exports.parseComment = parseComment;
8+
exp.getSettings = getSettings;
9+
exp.parseComment = parseComment;
10+
11+
export = exp;

0 commit comments

Comments
 (0)