TaylorBriggs/react-native-typewriter

Add type declarations for TypeScript users

Opened this issue · 4 comments

Hi @TaylorBriggs,

I'm just came across this package. It looks good and worth trying out, but I cannot do that yet because of missing type declarations.

It would be great to have the corresponding @types declaration for this package, so that we can simply install types like so -

$ yarn add @types/react-native-typewriter

For now, I guess I will add custom declaration file or something to make it work 🤞.


Thanks!

I'll try to take a look when I can, but if you put the types together yourself there's nothing stopping you from publishing that; the beauty of open source. My experience with TypeScript is pretty limited, so do those types need to correspond to the props? Thanks for opening the issue, as I know TS is really popular these days.

Indeed, I did that (had to add a definition file in node_modules/react-native-typewriter/). It works fine. Thing is, anyone installing (or updating) it has to add custom typings every time. I'll see if I can open a PR to get that fixed once I get some time.

PS: I'm now using this in the app I'm working on. Thanks again for writing the library!

@TaylorBriggs @roshnet While it's better when it's embedded within the repository, I've made a PR for typing DefinitelyTyped/DefinitelyTyped#64283

if you need to add it directly on the repo, just tell me I'll explain you. (would be better)