Skip to content

Commit dff885c

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sphinx_js/js/redirectPrivateAliases.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ export function redirectPrivateTypes(app: Application): ReadonlySymbolToType {
167167

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

0 commit comments

Comments
 (0)