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

Implementing in Typescript project #41

Closed
AndreasNasman opened this issue Mar 18, 2019 · 3 comments
Closed

Implementing in Typescript project #41

AndreasNasman opened this issue Mar 18, 2019 · 3 comments

Comments

@AndreasNasman
Copy link

AndreasNasman commented Mar 18, 2019

Hi!

I'm having problem including the confetti in my project built with create-react-app using the --typescript flag. For some reason all props seem to be mandatory, since the defaults aren't taking into consideration. Am I including it correctly, or is Typescript not supported?

image

@alampros
Copy link
Owner

Yikes! Sorry you're running into that. I'll take a look.

This was referenced Mar 18, 2019
@alampros
Copy link
Owner

I've tested this locally with v2.7.0 and it's behaving much better.

Please re-open if you're still having trouble.

@AndreasNasman
Copy link
Author

AndreasNasman commented Mar 20, 2019

Thanks for the fix!

Is the idea that the package should work fully without installing a separate @types package or making a module declaration file? This isn't the case now, since it has an implicit any type.

image
image

I bypassed this issue by creating my own react-confetti.d.ts file, but that of course means no autocomplete or type completion.

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

2 participants