lottie-reactxp
lottie-reactxp copied to clipboard
Add Typing to DefinitelyTyped
It would help TypeScript users and the adoption of this module, to add the typing file to DefinitelyTyped.
Here is the typing file I've implemented and am using in a real app now:
declare module "lottie-reactxp" {
import * as React from "react";
export interface ILottieProps {
source: object;
loop?: boolean;
isStopped?: boolean;
duration?: number;
width?: number;
height?: number;
style?: object;
onComplete?: () => void;
onLoopComplete?: () => void;
}
class Lottie extends React.Component<ILottieProps, any> {}
export default Lottie;
}
Hi @aanari - Do you think you could submit a PR to that project? I could add some documentation in this repo to ensure it gets updated/maintained whenever props are added.