From 6e85ff44492bfbee748c81d385a49df392157629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20Y=C4=B1ld=C4=B1z?= <47571500+0fatihyildiz@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:41:16 +0300 Subject: [PATCH] Fix type error when using array value in VueUse Motion directive Fixes #137 (#138) --- src/types/variants.ts | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/types/variants.ts b/src/types/variants.ts index bc70493b..fba5f9c6 100644 --- a/src/types/variants.ts +++ b/src/types/variants.ts @@ -18,29 +18,31 @@ export interface SVGPathProperties { /** * Transform properties */ -export interface TransformProperties { - x?: string | number - y?: string | number - z?: string | number - translateX?: string | number - translateY?: string | number - translateZ?: string | number - rotate?: string | number - rotateX?: string | number - rotateY?: string | number - rotateZ?: string | number - scale?: string | number - scaleX?: string | number - scaleY?: string | number - scaleZ?: string | number - skew?: string | number - skewX?: string | number - skewY?: string | number - originX?: string | number - originY?: string | number - originZ?: string | number - perspective?: string | number - transformPerspective?: string | number +type TransformValue = string | number; + +interface TransformProperties { + x?: TransformValue | TransformValue[]; + y?: TransformValue | TransformValue[]; + z?: TransformValue | TransformValue[]; + translateX?: TransformValue | TransformValue[]; + translateY?: TransformValue | TransformValue[]; + translateZ?: TransformValue | TransformValue[]; + rotate?: TransformValue | TransformValue[]; + rotateX?: TransformValue | TransformValue[]; + rotateY?: TransformValue | TransformValue[]; + rotateZ?: TransformValue | TransformValue[]; + scale?: TransformValue | TransformValue[]; + scaleX?: TransformValue | TransformValue[]; + scaleY?: TransformValue | TransformValue[]; + scaleZ?: TransformValue | TransformValue[]; + skew?: TransformValue | TransformValue[]; + skewX?: TransformValue | TransformValue[]; + skewY?: TransformValue | TransformValue[]; + originX?: TransformValue | TransformValue[]; + originY?: TransformValue | TransformValue[]; + originZ?: TransformValue | TransformValue[]; + perspective?: TransformValue | TransformValue[]; + transformPerspective?: TransformValue | TransformValue[]; } /**