I’m really new to ElasticSearch (picked it up a week ago). I’m trying to integrate it into one of my NodeJS applications. I’m using the guide here to implement it using Typescript.
From this page, it is saying I should define my own object interfaces to be used so that operations do not have a return type of any.
I want to ask how exactly I’m supposed to go about doing this? Do I need to define an interface for request body, response, and source for each document type I use in my implementation?
Like, do I need separate interfaces for doing match, multi_match, etc... queries, Responses, and Sources? Or is there a way to define a generic interface to work with all?
Thanks.