readd explicit type definition for direction

pull/6183/head
Theo-Steiner 5 years ago committed by Theodor Steiner
parent c3c251c466
commit bd33b89634

@ -107,7 +107,7 @@ export function slide(node: Element, {
easing = cubicOut,
axis = 'y'
}: SlideParams = {}): TransitionConfig {
const direction = { x: axis === 'x' ? 1 : 0, y: axis === 'y' ? 1 : 0 };
const direction: { x: 1 | 0, y: 1 | 0 } = { x: axis === 'x' ? 1 : 0, y: axis === 'y' ? 1 : 0 };
const style = getComputedStyle(node);
const opacity = +style.opacity;
const height = parseFloat(style.height);

Loading…
Cancel
Save