pub fn collect_record_names(modules: &[(&AIRModule, &Path)]) -> HashSet<String>Expand description
Collect the names of every record declared across modules (the names
the JS/TS backends emit as classes and construct with new Name(...)).
The per-module path emits each module in its own context, so a cross-module
record construction (handling (Log with ConsoleLog {}) where ConsoleLog
is used from another module) would not find the record in the local
record_names set and would mis-lower to a bare object literal {} instead
of new ConsoleLog() (dropping its prototype methods). Pre-seeding
record_names from the whole reachable set gives every per-module emit
context cross-module record visibility. Mirrors
collect_enum_variants / collect_trait_decls.