Leocardoso94 / animated-number-react

Super easy way to animate numbers with React
MIT License
103 stars 13 forks source link

can't able to install types from npm #17

Closed jeetrabadiya closed 3 years ago

jeetrabadiya commented 3 years ago

npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fanimated-number-react - Not found npm ERR! 404 npm ERR! 404 '@types/animated-number-react@latest' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

issue-label-bot[bot] commented 3 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.87. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Leocardoso94 commented 3 years ago

Hi @jeetrabadiya this package doesn't have types

jeetrabadiya commented 3 years ago

@Leocardoso94 No problem... I have created custom d.ts file for this package. Maybe it will help to those people who want to use this package in react-typescript.

declare module 'animated-number-react' {
    import React from 'react';
    export default class AnimatedNumber extends React.Component<AnimatedNumberProps> { }
    interface AnimatedNumberProps {
        value: string | number;
        duration?: number;
        delay?: number;
        className?: string;
        easing?: string;
        formatValue?: (value: number) => void;
    }
};
magic990619 commented 3 years ago

@Leocardoso94 can you please add types for this package? I really want to use this in typescript.

jeetrabadiya commented 3 years ago

@magic990619 I have a solution for types issue. Please refer this comment it will work for typescript.

https://github.com/Leocardoso94/animated-number-react/issues/17#issuecomment-700710670