I was attempting to use the JS library for elasticsearch in an Angular application. The library imported with no problem:
npm install elasticsearch
npm install @types/elasticsearch
And then the IDE could recognize the types for the API. However it would not work in the browser. Instead I had to use
npm install elasticsearch-browser
This works and now the API works but there is no @types/elasticsearch
to install. I can proceed with development but it really helps to have the
IDE check my code. Does anyone know if there is a type-definition out there somewhere?
A possible work-around is to somehow import the @types/elasticsearch
definitions and use them for the elasticsearch-browser
package. But I don't know how to do that. Any help?