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

could you add a @type Or add an index.d.ts #7

Open
danbran99 opened this issue Mar 23, 2022 · 1 comment
Open

could you add a @type Or add an index.d.ts #7

danbran99 opened this issue Mar 23, 2022 · 1 comment

Comments

@danbran99
Copy link

I try to use this package with typescript but I have this error message :

Could not find a declaration file for module '@ibm-watson/assistant-web-chat-react'. 'c:/Users/dfdgsdfg/Documents/VSProjet/next/Docker/nextjs-docker/node_modules/@ibm-watson/assistant-web-chat-react/dist/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/ibm-watson__assistant-web-chat-react if it exists or add a new declaration (.d.ts) file containing `declare module '@ibm-watson/assistant-web-chat-react';

Thank you

Danny

@ethanwinters
Copy link
Member

Hi Danny. This script can load any version of web chat, each that would have its own types on the instance passed back. We have had discussions about creating types for each version of web chat, so you could lock to a version of web chat and get the types for it, but we have yet to get enough demand to do so. I will leave this issue open and if there is enough demand we can prioritize! In the meantime, declaring the module in your globals.d.ts will at least unblock you.

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

No branches or pull requests

2 participants