Skip to content

Add Typing to DefinitelyTyped #20

@aanari

Description

@aanari

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;

}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions