Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add temporary fallbacks for reference resolution #682

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,17 @@ impl<'a> DocParser<'a> {
Module::Js(_) | Module::Json(_) | Module::Wasm(_) => {
let module_info = self.get_module_info(module.specifier())?;
let exports = module_info.exports(&self.root_symbol);
if name_path.is_empty() {
return Ok(Some(vec![]));
}
let root_name = name_path.remove(0);
let (mut export_name, export) = exports
let Some((mut export_name, export)) = exports
.resolved
.iter()
.find(|(name, _)| &&root_name == name)
.unwrap();
else {
return Ok(Some(vec![]));
};

let export = export.as_resolved_export();
let mut export_symbol = export.module.symbol(export.symbol_id).unwrap();
Expand Down
Loading