Updated new types export (#1446) (#1447)

* Updated new types

* Updated new types

* Updated test

* Updated docs

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2021-04-15 08:44:37 +02:00
committed by GitHub
parent 17b3d63428
commit 4ab53eee4b
3 changed files with 60 additions and 10 deletions

View File

@ -19,11 +19,11 @@
import { expectType, expectNotType, expectError } from 'tsd'
import { Client, RequestEvent, ResurrectEvent, ApiError, ApiResponse, estypes } from '../../'
import { NewClientTypes } from '../../api/new'
import type { Client as NewTypes } from '../../api/new'
import { TransportRequestPromise, Context } from '../../lib/Transport'
// @ts-expect-error
const client: NewClientTypes = new Client({
const client: NewTypes = new Client({
node: 'http://localhost:9200'
})
@ -104,5 +104,5 @@ client.async_search.get()
// the child api should return a KibanaClient instance
const child = client.child()
expectType<NewClientTypes>(child)
expectType<NewTypes>(child)
expectNotType<Client>(child)