Skip to content

Commit 896900e

Browse files
committed
Handle Symbols with no declarations
1 parent 067fe82 commit 896900e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sphinx_js/js/redirectPrivateAliases.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ export function redirectPrivateTypes(app: Application): ReadonlySymbolToType {
167167

168168
const missing = discoverMissingExports(mod, context);
169169
for (const name of missing) {
170+
// Some symbols e.g. JSX.LibraryManagedAttributes have no declarations
171+
if (!name.declarations || name.declarations.length === 0) {
172+
continue;
173+
}
170174
const decl = name.declarations![0];
171175
if (decl.getSourceFile().fileName.includes("node_modules")) {
172176
continue;

0 commit comments

Comments
 (0)