pub fn parse_module_structure(
code: &str,
) -> Result<(Vec<CollectedImport>, Vec<CollectedExport>, bool), CollectionError>Expand description
Parse a JavaScript/TypeScript module to extract its import/export structure
Uses fob-gen’s parser for consistent parsing and better error handling.
§Returns
Returns a tuple of (imports, exports, has_side_effects) where:
imports: List of import statements found in the moduleexports: List of export declarations found in the modulehas_side_effects: Conservative default oftrue(assumes side effects)
§Errors
Returns CollectionError::ParseError if the code contains syntax errors.