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

Can't be used with TypeScript #33

Closed
jacksrm opened this issue Oct 4, 2023 · 3 comments
Closed

Can't be used with TypeScript #33

jacksrm opened this issue Oct 4, 2023 · 3 comments

Comments

@jacksrm
Copy link

jacksrm commented Oct 4, 2023

Until now I can't find a good way to use it with typescript cause there's no type exported in the lib.

@masroorejaz
Copy link
Owner

Currently it's not compatible with typescript.

Thank you.

@Stuart88
Copy link

Stuart88 commented Dec 5, 2023

In your project source directory create a types folder and make a types file so typescript will not hit an error.

/// \src
/// ..\types
/// ..\..\react-simple-captcha.d.ts

declare module 'react-simple-captcha';

Now typescript lets you use it without types.

@masroorejaz
Copy link
Owner

@Stuart88 Thank you for providing the solution

I am pinning down your solution link to the main page of NPM.

Again thank you so much.

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

3 participants