Clarify typeguard usage

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2023-01-10 11:34:11 +01:00
parent 2a49ffbcb3
commit 0fcbe29c6b
@@ -180,6 +180,8 @@ export class ElasticSearchSearchEngine implements SearchEngine {
* import { Client } from '@elastic/elasticsearch';
*
* const client = searchEngine.newClient<Client>(options => {
* // This typeguard ensures options are compatible with either OpenSearch
* // or Elasticsearch client constructors.
* if (!isOpenSearchCompatible(options)) {
* return new Client(options);
* }