mifi / react-lottie-player

Fully declarative React Lottie player
MIT License
495 stars 52 forks source link

No type declarations for `LottiePlayerLight` #45

Closed kdembler closed 2 years ago

kdembler commented 3 years ago

Hey, thanks for this library!

It's great that we got the light version of the player released to improve the bundle size. However, it seems it's missing from the package type declarations and usage with Typescript is troublesome.

Sandbox: https://codesandbox.io/s/zen-stonebraker-2408d?file=/src/App.tsx

mifi commented 3 years ago

Hi! I'm not a master of TS, but if someone wants to fix it, PR is welcome. (preferably with reuse of types as much as possible)

mpeyper commented 2 years ago

Hi,

I just ran into this over on https://github.com/OpenSourceRaidGuild/youarerad/pull/6 and I can add the missing type definition for you.

I also think it would be really handy to offer a dedicated module for it too, so it can be imported like:

import Lottie from 'react-lottie-player/light';

I'll put a PR together for it now.