From c1329a374e0e06a759c85ae3c7464309cb95ff91 Mon Sep 17 00:00:00 2001 From: DHARANIDHARAN S R Date: Wed, 17 Sep 2025 14:57:51 +0530 Subject: [PATCH] Fix sliding number TRANSITION type issue with 'as const' assertion (#161) Fixes #159: TypeScript error where motion.span transition prop expects AnimationGeneratorType but was receiving generic string type. - Added 'as const' to TRANSITION.type to ensure literal type inference - Changed type: 'spring' to type: 'spring' as const - Resolves TypeScript compatibility with motion component requirements Co-authored-by: dharanidharansr --- components/core/sliding-number.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/core/sliding-number.tsx b/components/core/sliding-number.tsx index 161ff7dd..e6dd5208 100644 --- a/components/core/sliding-number.tsx +++ b/components/core/sliding-number.tsx @@ -10,7 +10,7 @@ import { import useMeasure from 'react-use-measure'; const TRANSITION = { - type: 'spring', + type: 'spring' as const, stiffness: 280, damping: 18, mass: 0.3,