mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
chore(angular): strict tslint (#16708)
This commit is contained in:
@ -10,8 +10,8 @@ export function inputs(instance: any, el: ElementRef, props: string[]) {
|
||||
}
|
||||
|
||||
export function proxyEvent<T>(emitter: Subject<T>, el: EventTarget, eventName: string) {
|
||||
el.addEventListener(eventName, (ev) => {
|
||||
emitter.next(ev ? (ev as any).detail as T : undefined);
|
||||
el.addEventListener(eventName, ev => {
|
||||
emitter.next((ev as any).detail as T);
|
||||
});
|
||||
}
|
||||
|
||||
@ -34,15 +34,14 @@ export function deepEqual(x: any, y: any) {
|
||||
if (x === y) {
|
||||
return true;
|
||||
} else if (typeof x === 'object' && x != null && (typeof y === 'object' && y != null)) {
|
||||
if (Object.keys(x).length !== Object.keys(y).length) return false;
|
||||
if (Object.keys(x).length !== Object.keys(y).length) { return false; }
|
||||
|
||||
for (const prop in x) {
|
||||
if (y.hasOwnProperty(prop)) {
|
||||
if (!deepEqual(x[prop], y[prop])) return false;
|
||||
} else return false;
|
||||
if (!deepEqual(x[prop], y[prop])) { return false; }
|
||||
} else { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
} else return false;
|
||||
} else { return false; }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user