yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

typescript import #149

Closed minhquan1313 closed 11 months ago

minhquan1313 commented 1 year ago

image I got this issue when importing it, I'm using vite react + swc Here is my package json image and tsconfig image image

enzogoncalves commented 11 months ago

@minhquan1313 could you solve this problem? if yes, please share your solution. I am having the same issue.

minhquan1313 commented 11 months ago

@minhquan1313 could you solve this problem? if yes, please share your solution. I am having the same issue.

image hehe just to turn that error off, create a .d.ts file and add these lines, and props I have to manually add by API of the official flickity doc :>

AaronJY commented 11 months ago

I've raised a PR to fix this! https://github.com/yaodingyd/react-flickity-component/pull/150 (pinging @enzogoncalves in case you're still struggling with this)

yaodingyd commented 11 months ago

v4.0.7 should fix this