Add support for a global context option (#1256)

This commit is contained in:
Tomas Della Vedova
2020-07-13 14:36:53 +02:00
committed by GitHub
parent 1a7727588e
commit 39cf023426
16 changed files with 2971 additions and 2851 deletions

View File

@ -623,3 +623,20 @@ expectError<errors.ConfigurationError>(
})
)
}
/**
* `context` option
*/
expectType<Client>(
new Client({
node: 'http://localhost:9200',
context: { hello: 'world' }
})
)
expectError<errors.ConfigurationError>(
new Client({
node: 'http://localhost:9200',
context: 'hello world'
})
)