Closed AbobkerElaghel closed 2 years ago
Is dist
the right folder for it? 🤔
Yes, it is, when pasting the file there all typescript errors disappear. as seen below, I had to write a copy command to copy the types file to its destination (dist). and run it right after npm i
I think a better place can be in a folder called ./types
on the root folder.
Same as in this repo.
If you can make the change I'll merge it.
When trying to fix the issue about 2 weeks ago, I tried lots of places, creating a types dir and putting the file inside didn't work, unfortunately. And to make sure, I just deleted it from dist and created a types dir and put the file inside, it did not work, gives a typescript error and is not compiling.
The one that worked is inside the dist location.
Shouldn't you be importing it on your code?
If u are talking about the types file, No. it should import the types automatically like all other repos. your only concern is to import the package to use it.
Yap, This fixed it.
index.d.ts
types
dir in the root dir"types": "types/index.d.ts"
TO package.json
I'll cancel this pull requirest and do another one with the modifications.
Thank you @AbobkerElaghel for your works and effort. Could you please make the Item object exportable ? This object is not just used internally as you know but also returned in the listeners onLeave, afterLoad and afterSlideLoad It's a quick fix : replace type Item with export type Item
@patcheco1001 done! I just need to figure out now why the codesandbox is not working so I can merge this. If you can give me a hand here I will appreciate it! 👍 https://codesandbox.io/s/m34yq5q0qx
Please accept, Some (IAAS) Infrastructure as a service platforms build the projects on every push, it fails the build process because of a typescript error for everyone that uses typescript with React fullPage.