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

Issue with types #33

Closed
eugeneshulga869 opened this issue Dec 21, 2021 · 4 comments · Fixed by #35
Closed

Issue with types #33

eugeneshulga869 opened this issue Dec 21, 2021 · 4 comments · Fixed by #35
Labels
more information needed More information has been requested from the issue author

Comments

@eugeneshulga869
Copy link

Failed to compile.

./node_modules/react-snowfall/lib/Snowflake.d.ts:10:27
Type error: ',' expected.

8 | * The default value is [0.5, 3.0].
9 | */

10 | radius: [minimumRadius: number, maximumRadius: number];
| ^
11 | /**
12 | * The minimum and maximum speed of the snowflake.

@cahilfoley
Copy link
Owner

Hi @eugeneshulga869, which version of TypeScript are you using?

The definition provided with the package uses Labeled Tuple Elements to make things more readable. If you're a version of TypeScript <4 this could explain the issue.

@cahilfoley cahilfoley added the more information needed More information has been requested from the issue author label Jan 5, 2022
@daniel-rck
Copy link

I think I got a similar problem. I included the package in my react app and then the types were not resolved correctly:

ERROR in node_modules/my-app/index.d.ts:1764:14 - error TS1110: Type expected.
1764     radius: [, ];

ERROR in node_modules/my-app/index.d.ts:1775:13 - error TS1110: Type expected.
1775     speed: [, ];

ERROR in node_modules/my-app/index.d.ts:1786:12 - error TS1110: Type expected.
1786     wind: [, ];

Using Typescript 4.3.5

@no-response
Copy link

no-response bot commented Jan 19, 2022

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Jan 19, 2022
@cahilfoley cahilfoley reopened this Jan 20, 2022
cahilfoley added a commit that referenced this issue Jan 20, 2022
This was causing TS problems in client apps.

fix #33
@cahilfoley
Copy link
Owner

Thanks @daniel-rck for the additional info. I've just published a new version v1.1.2 that should resolve this. Please let me know if you're still having a problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information needed More information has been requested from the issue author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants