react-native-art / art

React Native module that allows you to draw vector graphics.
https://github.com/react-native-community/art
MIT License
287 stars 79 forks source link

Typescript Path not in index.d.ts #59

Open wilau2 opened 4 years ago

wilau2 commented 4 years ago

Worth tracking this bug in this repo? https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24830

resulting in typescript error:

Module '"@react-native-community/art"' has no exported member 'Path'.
zeh commented 3 years ago

Still an issue for Path and LinearGradient.

Reisenudong commented 3 years ago

Still an issue for Path

josuesalas95 commented 3 years ago

Still an issue for Path

arp55 commented 3 years ago

Found a workaround for this bug. Regarding the type error you can add the ts-ignore above the import. The issue is that Path has not been exported from the package. So go to the index.js file in the art package in node modules and manually export the Path by just adding MODE.Path = require('./core/path'); along with the other exports. I hope this works. It did work for me.