JiriHoffmann / react-native-clusterer

React Native clustering library using C++ Supercluster implementation
MIT License
154 stars 19 forks source link

Typescript mismatch version #9

Open bataevvlad opened 2 years ago

bataevvlad commented 2 years ago

Looks like there is mismatch in version.

As if d.ts corresponds to one version of the library and the actual code is a different version

Below code and image of it:

 [Error: TransformError node_modules/react-native-clusterer/src/index.ts: /Users/vladbataev/WebstormProjects/zing-app/node_modules/react-native-clusterer/src/index.ts: Exporting local "supercluster", which is not declared.

export default Supercluster;
 export { Clusterer, supercluster, useClusterer };
mismatch image
JiriHoffmann commented 2 years ago

Could you provide a reproducible example?

nicknjpconsultingllc commented 2 years ago

@bataevvlad I don't know if this is the true fix but it started to work when I changed

import type supercluster from './types';

to

import supercluster from './types';

in node_modules/react-native-clusterer/src/index.ts

Nikooos commented 1 year ago

I have the same. Is there a more solid way to solve this?