Currently, I have a TypeScript function that is responsible for returning a fresh instance of Elasticsearch:
public getClient(): any {
return new Elasticsearch.Client({
host: ['url', ':', 'port'].join(''),
plugins: [ESDeleteByQuery],
log: 'logType'
});
}
My aim is to update the return type of the any function to be more specific. In my attempt to experiment with changing it to string, boolean, or {}, I noticed that despite these changes not correlating with the value returned by new Elasticsearch.Client(...), it still managed to pass the compilation process. So, what should actually be the accurate function return type?