Skip to content

Commit 87dd8fd

Browse files
committed
refactor(cdk/scrolling): remove circular dependencies
Uses type-only imports to resolve the circular dependencies in the scrolling module.
1 parent 81e6ead commit 87dd8fd

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

goldens/ts-circular-deps.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
[
2-
[
3-
"src/cdk/scrolling/scroll-dispatcher.ts",
4-
"src/cdk/scrolling/scrollable.ts"
5-
],
6-
[
7-
"src/cdk/scrolling/virtual-scroll-strategy.ts",
8-
"src/cdk/scrolling/virtual-scroll-viewport.ts"
9-
]
10-
]
1+
[]

src/cdk/scrolling/scroll-dispatcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {Platform} from '@angular/cdk/platform';
1111
import {ElementRef, Injectable, NgZone, OnDestroy, Optional, Inject} from '@angular/core';
1212
import {fromEvent, of as observableOf, Subject, Subscription, Observable, Observer} from 'rxjs';
1313
import {auditTime, filter} from 'rxjs/operators';
14-
import {CdkScrollable} from './scrollable';
14+
import type {CdkScrollable} from './scrollable';
1515
import {DOCUMENT} from '@angular/common';
1616

1717
/** Time in ms to throttle the scrolling events by default. */

src/cdk/scrolling/virtual-scroll-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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

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

0 commit comments

Comments
 (0)