Skip to content

Commit 1106cb1

Browse files
refactor: assert value for RxJS v7 compatibility (#19569)
1 parent b15fe6d commit 1106cb1

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
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);

tools/public_api_guard/material/snack-bar.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export declare class MatSnackBarConfig<D = any> {
3535

3636
export declare class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy {
3737
_animationState: string;
38-
readonly _onEnter: Subject<any>;
39-
readonly _onExit: Subject<any>;
38+
readonly _onEnter: Subject<void>;
39+
readonly _onExit: Subject<void>;
4040
_portalOutlet: CdkPortalOutlet;
4141
_role: 'alert' | 'status' | null;
4242
attachDomPortal: (portal: DomPortal) => void;

0 commit comments

Comments
 (0)