-
Notifications
You must be signed in to change notification settings - Fork 534
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
Supercluster types should be dependency + error in their import #791
Comments
Hey @henrinormak I am not too sure why the examples didn't pick this up, I will have a look if I have some time, meanwhile feel free to open a pull request if you have some time with a proper fix |
@alex3165 I'll see if I can whip up a PR that would fix the problem, I have not touched the codebase of react-mapbox-gl before, so it might take me a bit longer to sort this out though. |
Chiming in to say this is also breaking our webpack builds (we're not transpiling
Changing the import in
|
As per #735 this was solved by installing |
|
Due to the way Supercluster types are used here, they should be listed as dependency/peerDependency, not just devDep. The reason is the exported State interface, which refers to the Supercluster type.
Furthermore, even after installing the supercluster types to a project, typescript still fails with the following error:
If I were to alter the code in cluster.d.ts:4 to be
import * as Supercluster from 'supercluster';
then this error goes away. So probably this is caused by changes made in #731.#735 referred to a build error that might be somewhat related to this.
The text was updated successfully, but these errors were encountered: