lottie-reactxp icon indicating copy to clipboard operation
lottie-reactxp copied to clipboard

Add Typing to DefinitelyTyped

Open aanari opened this issue 7 years ago • 1 comments

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;

}

aanari avatar Mar 01 '18 19:03 aanari

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.

colmbrady avatar Mar 01 '18 19:03 colmbrady