Closed
Description
🚀 Feature Proposal
I have not found an issue about this before.
It would be nice to have the common types included in the source code.
The ones that are here in this PR:
https://github.com/elastic/elasticsearch-js/pull/742/files
and use it like so:
import { Client, ApiResponse, RequestParams, SearchResponse } from '@elastic/elasticsearch';
interface CoolBody{
cool: 'yes';
}
client
.search(params)
.then((result: ApiResponse<SearchResponse<CoolBody>>) => {
Motivation
Reduces code, maintenance, technical depth, complexity, learning curve
One argument I could think of why you wouldn't include them is if they are different per setup.
Then I would simply suggest to rename SearchResponse
to DefaultSearchResponse
I can't teach my students all this workload before they can do a simple search. I want to hide this complexity.
Metadata
Metadata
Assignees
Labels
No labels