[AAE-622] No implicit returns (#5157)

* enable noImplicitReturns rule

* type fixes

* fix return types

* fix return value

* fix tests

* fix visibility service

* update tests

* add missing types

* fix test
This commit is contained in:
Denys Vuika
2019-10-17 09:35:39 +01:00
committed by GitHub
parent 48aca2d30f
commit d7ab0417b8
65 changed files with 366 additions and 319 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, Input, ViewChild, OnInit, OnDestroy, ViewEncapsulation, OnChanges } from '@angular/core';
import { Component, Input, ViewChild, OnInit, OnDestroy, ViewEncapsulation, OnChanges, SimpleChanges } from '@angular/core';
import { MatSidenav } from '@angular/material';
import { sidenavAnimation, contentAnimation } from '../../helpers/animations';
import { Direction } from '@angular/cdk/bidi';
@@ -80,7 +80,7 @@ export class LayoutContainerComponent implements OnInit, OnDestroy, OnChanges {
this.mediaQueryList.removeListener(this.onMediaQueryChange);
}
ngOnChanges(changes) {
ngOnChanges(changes: SimpleChanges) {
if (changes && changes.direction) {
this.contentAnimationState = this.toggledContentAnimation;
}
@@ -99,17 +99,17 @@ export class LayoutContainerComponent implements OnInit, OnDestroy, OnChanges {
return this.mediaQueryList.matches;
}
getContentAnimationState() {
getContentAnimationState(): any {
return this.contentAnimationState;
}
private get toggledSidenavAnimation() {
private get toggledSidenavAnimation(): any {
return this.sidenavAnimationState === this.SIDENAV_STATES.EXPANDED
? this.SIDENAV_STATES.COMPACT
: this.SIDENAV_STATES.EXPANDED;
}
private get toggledContentAnimation() {
private get toggledContentAnimation(): any {
if (this.isMobileScreenSize) {
return this.CONTENT_STATES.MOBILE;
}
@@ -150,7 +150,7 @@ export class LayoutContainerComponent implements OnInit, OnDestroy, OnChanges {
}
}
private onMediaQueryChange() {
private onMediaQueryChange(): void {
this.sidenavAnimationState = this.SIDENAV_STATES.EXPANDED;
this.contentAnimationState = this.toggledContentAnimation;
}