File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -51,5 +51,6 @@ Paste the results here:
5151
5252- * node version* : 6,8,10
5353- ` @elastic/elasticsearch ` * version* : >=7.0.0
54+ - * typescript version* : 4.x (if applicable)
5455- * os* : Mac, Windows, Linux
5556- * any other relevant information*
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ of type definitions of Elasticsearch's API surface.
77The types are not 100% complete yet. Some APIs are missing (the newest ones, e.g. EQL),
88and others may contain some errors, but we are continuously pushing fixes & improvements.
99
10+ NOTE: The client is developed against the https://www.npmjs.com/package/typescript?activeTab=versions[latest]
11+ version of TypeScript. Furthermore, unless you have set `skipLibCheck` to `true`,
12+ you should configure `esModuleInterop` to `true`.
13+
1014[discrete]
1115==== Example
1216
@@ -77,3 +81,10 @@ You can import the full TypeScript requests & responses definitions as it follow
7781----
7882import { estypes } from '@elastic/elasticsearch'
7983----
84+
85+ If you need the legacy definitions with the body, you can do the following:
86+
87+ [source,ts]
88+ ----
89+ import { estypesWithBody } from '@elastic/elasticsearch'
90+ ----
Original file line number Diff line number Diff line change @@ -21,5 +21,7 @@ import Client from './lib/client'
2121import SniffingTransport from './lib/sniffingTransport'
2222
2323export * from '@elastic/transport'
24+ export * as estypes from './lib/api/types'
25+ export * as estypesWithBody from './lib/api/types'
2426export { Client , SniffingTransport }
2527export type { ClientOptions , NodeOptions } from './lib/client'
You can’t perform that action at this time.
0 commit comments