perf(all): minify better by using arrow functions (#18730)

This commit is contained in:
Manu MA
2019-07-10 16:33:33 +02:00
committed by Brandy Carney
parent 8beeff2c52
commit 03c1d19e07
99 changed files with 653 additions and 679 deletions

View File

@ -9,11 +9,11 @@ const TRANSLATEX = 'translateX';
const CENTER = '0%';
const OFF_OPACITY = 0.8;
export function shadow<T extends Element>(el: T): ShadowRoot | T {
export const shadow = <T extends Element>(el: T): ShadowRoot | T => {
return el.shadowRoot || el;
}
};
export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement, opts: TransitionOptions): Promise<Animation> {
export const iosTransitionAnimation = (AnimationC: Animation, navEl: HTMLElement, opts: TransitionOptions): Promise<Animation> => {
const isRTL = (navEl.ownerDocument as any).dir === 'rtl';
const OFF_RIGHT = isRTL ? '-99.5%' : '99.5%';
@ -228,4 +228,4 @@ export function iosTransitionAnimation(AnimationC: Animation, navEl: HTMLElement
}
// Return the rootTransition promise
return Promise.resolve(rootTransition);
}
};