Skip to content

Commit 37231b8

Browse files
committed
fix: skip processing for default or skipped symbols
1 parent 7a7e319 commit 37231b8

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

packages/ts-doc/src/parsers/DocParser.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,15 @@ class DocParser {
3838
const {symbols} = new DocParser(docFile.contents).parse();
3939

4040
const promises = await Promise.all(
41-
[...symbols.values()]
42-
.filter((symbol) => symbol.skip !== true)
43-
.map(async (symbol) => {
44-
try {
45-
await symbol.setDocFile(docFile);
46-
47-
return symbol;
48-
} catch (er) {
49-
logger.error("Fail to process symbol", {symbol, error: er});
50-
}
51-
})
41+
[...symbols.values()].map(async (symbol) => {
42+
try {
43+
await symbol.setDocFile(docFile);
44+
45+
return symbol;
46+
} catch (er) {
47+
logger.error("Fail to process symbol", {symbol, error: er});
48+
}
49+
})
5250
);
5351

5452
const parsedSymbols = await Promise.all(promises);
@@ -165,8 +163,10 @@ class DocParser {
165163

166164
symbol.endLine = index;
167165

168-
if (!symbol.skip) {
169-
this.setSymbol(symbol, map);
166+
this.setSymbol(symbol, map);
167+
168+
if (["_default", "default"].includes(symbol?.symbolName) || symbol?.skip) {
169+
this.symbols.delete(symbolParser.symbol?.symbolName);
170170
}
171171

172172
this.currentComment = [];

0 commit comments

Comments
 (0)