Skip to content

Commit 2dd93f4

Browse files
refactor: assert value for RxJS v7 compatibility
1 parent f428c00 commit 2dd93f4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/cdk/scrolling/scrollable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type ExtendedScrollToOptions = _XAxis & _YAxis & ScrollOptions;
4545
selector: '[cdk-scrollable], [cdkScrollable]'
4646
})
4747
export class CdkScrollable implements OnInit, OnDestroy {
48-
private _destroyed = new Subject();
48+
private _destroyed = new Subject<void>();
4949

5050
private _elementScrolled: Observable<Event> = new Observable((observer: Observer<Event>) =>
5151
this.ngZone.runOutsideAngular(() =>

src/cdk/scrolling/virtual-for-of.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class CdkVirtualForOf<T> implements CollectionViewer, DoCheck, OnDestroy
240240
ngOnDestroy() {
241241
this._viewport.detach();
242242

243-
this._dataSourceChanges.next();
243+
this._dataSourceChanges.next(undefined!);
244244
this._dataSourceChanges.complete();
245245
this.viewChange.complete();
246246

src/material/snack-bar/snack-bar-container.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ export class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy
6262
@ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;
6363

6464
/** Subject for notifying that the snack bar has exited from view. */
65-
readonly _onExit: Subject<any> = new Subject();
65+
readonly _onExit: Subject<void> = new Subject();
6666

6767
/** Subject for notifying that the snack bar has finished entering the view. */
68-
readonly _onEnter: Subject<any> = new Subject();
68+
readonly _onEnter: Subject<void> = new Subject();
6969

7070
/** The state of the snack bar animations. */
7171
_animationState = 'void';

src/material/tooltip/tooltip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ export class TooltipComponent implements OnDestroy {
641641
private _closeOnInteraction: boolean = false;
642642

643643
/** Subject for notifying that the tooltip has been hidden from the view */
644-
private readonly _onHide: Subject<any> = new Subject();
644+
private readonly _onHide: Subject<void> = new Subject();
645645

646646
/** Stream that emits whether the user has a handset-sized display. */
647647
_isHandset: Observable<BreakpointState> = this._breakpointObserver.observe(Breakpoints.Handset);

0 commit comments

Comments
 (0)