Skip to content
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

Typescript declarations do not work? #146

Open
komarovalexander opened this issue Nov 24, 2020 · 7 comments
Open

Typescript declarations do not work? #146

komarovalexander opened this issue Nov 24, 2020 · 7 comments

Comments

@komarovalexander
Copy link

Hi,
Thanks for your work on this library. I use typescript in my project and get next issue:

I import

import ReactExport from 'react-data-export';

and get
image

but there is no available @types/react-data-export

how can I solve it?

Thanks

@ralphocdol
Copy link

For some reason, the types in NPM package of react-data-export is different, maybe it's outdated. You have to do this yourself at least for now.

  1. In this repo, go to types/index.d.ts here
  2. Either copy the codes or download the file.
  3. Add it to your project, I added mine at src/modules/types/react-data.export.d.ts

this should work.

@bikash9449
Copy link

The same is happening to me, Also even after copying it into types folder I explicitly had to move it to distr folder after deployment

@OkancanCosar
Copy link

i already created react-data.export.d.ts file and fill with
https://github.com/securedeveloper/react-data-export/blob/master/types/index.d.ts
but still getting

Could not find a declaration file for module 'react-export-excel'. 'C:/prj/node_modules/react-export-excel/dist/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-export-excel if it exists or add a new declaration (.d.ts) file containing declare module 'react-export-excel';

is it about typescript version? File noted 2.2 but i have 4.3.x

@dalthonmh
Copy link

It says me:

yarn add v1.16.0
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@types%2freact-export-excel: Not found".
info If you think this is a bug, please open a bug report with the information provided in "E:\\DATA\\client\\yarn-error.log".        
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command

@Daalb
Copy link

Daalb commented Apr 21, 2022

I have the same problem 😢

@sankarkumar23
Copy link

sankarkumar23 commented Mar 26, 2023

Same issue here. When will get the rewritten package?

imsuvesh added a commit to imsuvesh/react-data-export that referenced this issue May 16, 2023
imsuvesh added a commit to imsuvesh/react-data-export that referenced this issue May 16, 2023
@tranviet2010
Copy link

#146 (comment)

Answer like no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants