mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): update tslint
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user