Browse Source

Chore: fix type on lottie props (#2593)

代强 11 months ago
parent
commit
ee4349804b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/semi-foundation/lottie/foundation.ts

+ 2 - 2
packages/semi-foundation/lottie/foundation.ts

@@ -10,7 +10,7 @@ export interface LottieAdapter<P = Record<string, any>, S = Record<string, any>>
 export interface LottieBaseProps {
     width?: string;
     height?: string;
-    params: ArgsType<typeof lottie.loadAnimation>[0];
+    params: Partial<ArgsType<typeof lottie.loadAnimation>[0]>;
     getAnimationInstance?: (instance: AnimationItem|null) => void;
     getLottie?: (lottiePKG: typeof lottie) => void
 
@@ -57,4 +57,4 @@ class LottieFoundation <P = Record<string, any>, S = Record<string, any>> extend
 
 }
 
-export default LottieFoundation;
+export default LottieFoundation;