2

Im trying to use this NPM package:

https://www.npmjs.com/package/@livechat/chat-sdk

I've installed it by using:

yarn add @livechat/chat-sdk

I've also included the types by doing:

yarn add @types/@livechat/chat-sdk

I'm importing it to my project by doing:

import LiveChat from '@livechat/chat-sdk';

but when I try to use it in my project I don't get any intelesence from VS Code. Why?

Raphael Castro
  • 907
  • 1
  • 8
  • 26

1 Answers1

2

Unfortunately LiveChat SDK does not provide any definition file (.d.ts) and/or JSDoc in the source file so Intellisense cannot "guess" the correct type.

You can try adding custom type definitions by hand, see this article.

PS: The development dependency @types/@livechat/chat-sdk is not a valid package name and so does not exists :(

PS.PS: I suggest you to write the .d.ts file since is good for learning and create a pull request or contact a collaborator for merging the changes.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Carlo Corradini
  • 2,927
  • 2
  • 18
  • 24