Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type declarations for TypeScript users #41

Open
roshnet opened this issue Jan 6, 2021 · 5 comments
Open

Add type declarations for TypeScript users #41

roshnet opened this issue Jan 6, 2021 · 5 comments

Comments

@roshnet
Copy link

roshnet commented Jan 6, 2021

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!

@roshnet roshnet changed the title Add types for TypeScript users Add type declarations for TypeScript users Jan 6, 2021
@TaylorBriggs
Copy link
Owner

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.

@roshnet
Copy link
Author

roshnet commented Jan 8, 2021

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!

@JosephPBallantyne
Copy link

Quick solution found here: https://medium.com/@steveruiz/using-a-javascript-library-without-type-declarations-in-a-typescript-project-3643490015f3

I may add typing if I get the chance :)

@ScreamZ
Copy link

ScreamZ commented Feb 8, 2023

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@TaylorBriggs @ScreamZ @JosephPBallantyne @roshnet and others