Skip to content

refactor: assert value for RxJS v7 compatibility #19569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cdk/scrolling/scrollable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type ExtendedScrollToOptions = _XAxis & _YAxis & ScrollOptions;
selector: '[cdk-scrollable], [cdkScrollable]'
})
export class CdkScrollable implements OnInit, OnDestroy {
private _destroyed = new Subject();
private _destroyed = new Subject<void>();

private _elementScrolled: Observable<Event> = new Observable((observer: Observer<Event>) =>
this.ngZone.runOutsideAngular(() =>
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/scrolling/virtual-for-of.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export class CdkVirtualForOf<T> implements CollectionViewer, DoCheck, OnDestroy
ngOnDestroy() {
this._viewport.detach();

this._dataSourceChanges.next();
this._dataSourceChanges.next(undefined!);
this._dataSourceChanges.complete();
this.viewChange.complete();

Expand Down
4 changes: 2 additions & 2 deletions src/material/snack-bar/snack-bar-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ export class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy
@ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;

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

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

/** The state of the snack bar animations. */
_animationState = 'void';
Expand Down
2 changes: 1 addition & 1 deletion src/material/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ export class TooltipComponent implements OnDestroy {
private _closeOnInteraction: boolean = false;

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

/** Stream that emits whether the user has a handset-sized display. */
_isHandset: Observable<BreakpointState> = this._breakpointObserver.observe(Breakpoints.Handset);
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/material/snack-bar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export declare class MatSnackBarConfig<D = any> {

export declare class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy {
_animationState: string;
readonly _onEnter: Subject<any>;
readonly _onExit: Subject<any>;
readonly _onEnter: Subject<void>;
readonly _onExit: Subject<void>;
_portalOutlet: CdkPortalOutlet;
_role: 'alert' | 'status' | null;
attachDomPortal: (portal: DomPortal) => void;
Expand Down