chore(): update tslint

This commit is contained in:
Manu Mtz.-Almeida
2018-09-04 23:56:36 +02:00
parent dc34475da7
commit 1f24370497
4 changed files with 6 additions and 6 deletions

View File

@@ -42,7 +42,7 @@
"stylelint": "^9.4.0",
"stylelint-order": "^0.8.1",
"tslint": "^5.10.0",
"tslint-ionic-rules": "0.0.17",
"tslint-ionic-rules": "0.0.18",
"tslint-react": "^3.6.0",
"typescript": "^2.9.2",
"yargs": "^12.0.1"

View File

@@ -25,7 +25,7 @@ export const TRANSFORM_PROPS: {[key: string]: number} = {
'perspective': 1
};
const raf = window.requestAnimationFrame
const raf = (window as any).requestAnimationFrame
? window.requestAnimationFrame.bind(window)
: (f: FrameRequestCallback) => f(Date.now());

View File

@@ -61,7 +61,7 @@ export class Menu implements MenuI {
typeChanged(type: string, oldType: string | undefined) {
const contentEl = this.contentEl;
if (contentEl) {
if (oldType) {
if (oldType !== undefined) {
contentEl.classList.remove(`menu-content-${oldType}`);
}
contentEl.classList.add(`menu-content-${type}`);

View File

@@ -1,4 +1,4 @@
import { CssClassMap, Mode, RouterDirection } from '../interface';
import { Color, CssClassMap, Mode, RouterDirection } from '../interface';
export function hostContext(selector: string, el: HTMLElement): boolean {
return !!el.closest(selector);
@@ -7,8 +7,8 @@ export function hostContext(selector: string, el: HTMLElement): boolean {
/**
* Create the mode and color classes for the component based on the classes passed in
*/
export function createColorClasses(color: string | undefined): CssClassMap | undefined {
return (color !== undefined) ? {
export function createColorClasses(color: Color | undefined | null): CssClassMap | undefined {
return (color != null) ? {
'ion-color': true,
[`ion-color-${color}`]: true
} : undefined;