Skip to content

Commit

Permalink
refactor(cdk/scrolling): remove circular dependencies
Browse files Browse the repository at this point in the history
Uses type-only imports to resolve the circular dependencies in the scrolling module.
  • Loading branch information
crisbeto committed May 27, 2023
1 parent 81e6ead commit 87dd8fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions goldens/ts-circular-deps.json
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
[
[
"src/cdk/scrolling/scroll-dispatcher.ts",
"src/cdk/scrolling/scrollable.ts"
],
[
"src/cdk/scrolling/virtual-scroll-strategy.ts",
"src/cdk/scrolling/virtual-scroll-viewport.ts"
]
]
[]
2 changes: 1 addition & 1 deletion src/cdk/scrolling/scroll-dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Platform} from '@angular/cdk/platform';
import {ElementRef, Injectable, NgZone, OnDestroy, Optional, Inject} from '@angular/core';
import {fromEvent, of as observableOf, Subject, Subscription, Observable, Observer} from 'rxjs';
import {auditTime, filter} from 'rxjs/operators';
import {CdkScrollable} from './scrollable';
import type {CdkScrollable} from './scrollable';
import {DOCUMENT} from '@angular/common';

/** Time in ms to throttle the scrolling events by default. */
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/scrolling/virtual-scroll-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import {InjectionToken} from '@angular/core';
import {Observable} from 'rxjs';
import {CdkVirtualScrollViewport} from './virtual-scroll-viewport';
import type {CdkVirtualScrollViewport} from './virtual-scroll-viewport';

/** The injection token used to specify the virtual scrolling strategy. */
export const VIRTUAL_SCROLL_STRATEGY = new InjectionToken<VirtualScrollStrategy>(
Expand Down

0 comments on commit 87dd8fd

Please sign in to comment.