Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(semantic): move determining references flags for export spec…
…ifier to `visit_export_named_declaration` (#7924) ``` ts export type { a }; export { type b }; ``` In the above cases, `a` and `b` are both type-only references. Before, we handled them in `visit_export_named_declaration` and `visit_export_specifier`, but it doesn't look intuitive due to we need to determine if `ExportNamedSpecifier` is a type-only in `visit_export_specifier ` by checking if `current_reference_flags` is a type, and also needs to set it back before exit node. This PR moves determining reference flags from `visit_export_specifier` to `visit_export_named_declaration` so that we don't need to check `current_reference_flags` and set it back because here we can always know the if `ExportSpecifierNamed` is type-only by `ExportNamedDeclaration::export_kind::is_type`.
- Loading branch information