Skip to content

Commit

Permalink
scripts[minor]:Some symbols have empty declarations (#4993)
Browse files Browse the repository at this point in the history
* Some symbols have empty declarations

* format
  • Loading branch information
tomoima525 authored Apr 6, 2024
1 parent 82de094 commit 2f5a012
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/langchain-scripts/src/migrations/0_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ async function getEntrypointsFromFile(
path.join(packagePath, "src", `${value}.ts`)
);
const exportedSymbolsMap = newFile.getExportedDeclarations();
const exportedSymbols = Array.from(exportedSymbolsMap.entries()).map(
([symbol, declarations]) => ({
const exportedSymbols = Array.from(exportedSymbolsMap.entries())
.filter(([_, declarations]) => declarations.length > 0)
.map(([symbol, declarations]) => ({
kind: declarations[0].getKind(),
symbol,
})
);
}));
return {
entrypoint: key,
exportedSymbols,
Expand Down

0 comments on commit 2f5a012

Please sign in to comment.