Skip to content
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

fix: correct EventEmitter generic type across lib #1620

Merged
merged 1 commit into from
Oct 27, 2016
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
4 changes: 2 additions & 2 deletions src/lib/core/a11y/list-key-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ListKeyManager {
* This event is emitted any time the TAB key is pressed, so components can react
* when focus is shifted off of the list.
*/
@Output() tabOut: EventEmitter<null> = new EventEmitter();
@Output() tabOut = new EventEmitter<void>();

constructor(private _items: QueryList<MdFocusable>) {}

Expand All @@ -35,7 +35,7 @@ export class ListKeyManager {
} else if (event.keyCode === UP_ARROW) {
this._focusPreviousItem();
} else if (event.keyCode === TAB) {
this.tabOut.emit(null);
this.tabOut.emit();
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/core/overlay/overlay-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class ConnectedOverlayDirective implements OnDestroy {
}

/** Event emitted when the backdrop is clicked. */
@Output() backdropClick: EventEmitter<null> = new EventEmitter();
@Output() backdropClick = new EventEmitter<void>();

// TODO(jelbourn): inputs for size, scroll behavior, animation, etc.

Expand Down Expand Up @@ -178,7 +178,7 @@ export class ConnectedOverlayDirective implements OnDestroy {

if (this.hasBackdrop) {
this._backdropSubscription = this._overlayRef.backdropClick().subscribe(() => {
this.backdropClick.emit(null);
this.backdropClick.emit();
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/rtl/dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Dir {
let old = this._dir;
this._dir = v;
if (old != this._dir) {
this.dirChange.emit(null);
this.dirChange.emit();
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/menu/menu-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class MdMenu {
}, {});
}

@Output() close = new EventEmitter;
@Output() close = new EventEmitter<void>();

/**
* Focus the first item in the menu. This method is used by the menu trigger
Expand All @@ -80,7 +80,7 @@ export class MdMenu {
* trigger will close the menu.
*/
private _emitCloseEvent(): void {
this.close.emit(null);
this.close.emit();
}

private _setPositionX(pos: MenuPositionX): void {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/menu/menu-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export class MdMenuTrigger implements AfterViewInit, OnDestroy {
private _openedFromKeyboard: boolean = false;

@Input('md-menu-trigger-for') menu: MdMenu;
@Output() onMenuOpen = new EventEmitter();
@Output() onMenuClose = new EventEmitter();
@Output() onMenuOpen = new EventEmitter<void>();
@Output() onMenuClose = new EventEmitter<void>();

constructor(private _overlay: Overlay, private _element: ElementRef,
private _viewContainerRef: ViewContainerRef, private _renderer: Renderer) {}
Expand Down Expand Up @@ -140,7 +140,7 @@ export class MdMenuTrigger implements AfterViewInit, OnDestroy {
// set state rather than toggle to support triggers sharing a menu
private _setIsMenuOpen(isOpen: boolean): void {
this._menuOpen = isOpen;
this._menuOpen ? this.onMenuOpen.emit(null) : this.onMenuClose.emit(null);
this._menuOpen ? this.onMenuOpen.emit() : this.onMenuClose.emit();
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/lib/sidenav/sidenav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ export class MdSidenav {
this._transition = true;

if (isOpen) {
this.onOpenStart.emit(null);
this.onOpenStart.emit();
} else {
this.onCloseStart.emit(null);
this.onCloseStart.emit();
}

if (isOpen) {
Expand Down Expand Up @@ -160,7 +160,7 @@ export class MdSidenav {
this._closePromiseReject();
}

this.onOpen.emit(null);
this.onOpen.emit();
} else {
if (this._closePromise != null) {
this._closePromiseResolve();
Expand All @@ -169,7 +169,7 @@ export class MdSidenav {
this._openPromiseReject();
}

this.onClose.emit(null);
this.onClose.emit();
}

this._openPromise = null;
Expand Down