node-crisp-api
node-crisp-api copied to clipboard
Type definition is outdated and does not include services
Services like .website are not included in type and causes a ts error
Hello!
We think it;'s just a lint error from typescript
https://github.com/crisp-im/node-crisp-api/blob/master/types/crisp.d.ts
Your definition for Crisp does not include services like .website, If typescript does not see it in the type definition, it cause a compilation error, not lint error.

It can be "mitigated" by disabling typescript error for every Crisp.website lines, but that would defeat the purpose of having a type definition
Hey William!
No one at Crisp is doing any TypeScript, so we accept PRs on this.
Hi, same issue here :(
any movement on this? Seeing the same issue.
Hey @aoloo , no movement, we're open to PRs.
still not resolved :( for Typescript
Hey @frank505 ! We're 100% open to PR's on this one.
We'd eagerly accept a PR doing the following: have a command to auto-gen TS definitions from JSDoc (which we 100% maintain), and a GH actions test to ensure all TS definitions are up-to-date, failing if not thus prompting devs to sync those definitions before committing.
All fixed in v7.4.1, and tested.
Note that exported services are using the any type, so resource method prototypes will not be checked in TypeScript. Although the base Crisp class is 100% defined and type-checked. This is for convenience on our side as we use pure-JS for our library, and would like to provide TypeScript support whilst not maintaining definition files ourselves (meaning, we auto-generate them from JSDoc).