Skip to content

refactor(router): remove unused imports#68750

Closed
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:refactor-router-remove-unused-imports
Closed

refactor(router): remove unused imports#68750
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:refactor-router-remove-unused-imports

Conversation

@erkamyaman
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Four files in packages/router/src import names they don't use:

  • directives/router_outlet.ts: Observable from rxjs and Params from ../shared
  • operators/resolve_data.ts: EnvironmentInjector from @angular/core
  • utils/config.ts: ActivatedRouteSnapshot from ../router_state
  • utils/preactivation.ts: EnvironmentInjector from @angular/core

Each is unreferenced outside its import line.

What is the new behavior?

The unused imports are removed. No runtime or type-surface changes.

Does this PR introduce a breaking change?

  • Yes
  • No

Drop five unused imports across four router files: `Observable` and
`Params` in `router_outlet.ts`, `EnvironmentInjector` in `resolve_data.ts`
and `preactivation.ts`, and `ActivatedRouteSnapshot` in `config.ts`.
@pullapprove pullapprove Bot requested a review from crisbeto May 15, 2026 17:44
@ngbot ngbot Bot added this to the Backlog milestone May 15, 2026
@JeanMeche
Copy link
Copy Markdown
Member

Honnestly this kind of cleanup isn't really necessary. It's better to spend time on more meaningful changes.

@JeanMeche JeanMeche closed this May 15, 2026
@erkamyaman erkamyaman deleted the refactor-router-remove-unused-imports branch May 15, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants