|
@@ -4,6 +4,8 @@ import type { ES9ClientDelegator } from './es9-client-delegator';
|
|
|
|
|
|
|
|
export type ElasticsearchClientDelegator = ES7ClientDelegator | ES8ClientDelegator | ES9ClientDelegator;
|
|
export type ElasticsearchClientDelegator = ES7ClientDelegator | ES8ClientDelegator | ES9ClientDelegator;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+// type guard
|
|
|
export const isES7Client = (delegator: ElasticsearchClientDelegator): delegator is ES7ClientDelegator => {
|
|
export const isES7Client = (delegator: ElasticsearchClientDelegator): delegator is ES7ClientDelegator => {
|
|
|
return delegator.delegetorVersion === 7;
|
|
return delegator.delegetorVersion === 7;
|
|
|
};
|
|
};
|