@@ -307,12 +307,38 @@ function createVersionExportedApis(
307
307
}
308
308
}
309
309
310
+ // Handle export specifiers which can be present in namespaces
311
+ if (t.isExportSpecifier(node)) {
312
+ if (node.local && node.local.name) {
313
+ refs.add(node.local.name);
314
+ }
315
+ }
316
+
310
317
// Handle indexed access types (` T [ 'key' ] `)
311
318
if (t.isTSIndexedAccessType(node)) {
312
319
getTypeReferencesForNode(node.objectType, refs);
313
320
getTypeReferencesForNode(node.indexType, refs);
314
321
}
315
322
323
+ // Handle union types (` T | U `)
324
+ if (t.isTSUnionType(node)) {
325
+ for (const member of node.types) {
326
+ getTypeReferencesForNode(member, refs);
327
+ }
328
+ }
329
+
330
+ // Handle intersection types (` T & U `)
331
+ if (t.isTSIntersectionType(node)) {
332
+ for (const member of node.types) {
333
+ getTypeReferencesForNode(member, refs);
334
+ }
335
+ }
336
+
337
+ // Handle type operators (` keyof T `)
338
+ if (t.isTSTypeOperator(node)) {
339
+ getTypeReferencesForNode(node.typeAnnotation, refs);
340
+ }
341
+
316
342
// Handle conditional types (` T extends U ? X : Y `)
317
343
if (t.isTSConditionalType(node)) {
318
344
getTypeReferencesForNode(node.checkType, refs);
0 commit comments