diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts index 7cb38fbaaa..eadcec0214 100644 --- a/src/runtime/transition/index.ts +++ b/src/runtime/transition/index.ts @@ -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);