Don't use initializer syntax for instantiating client

For some reason, the property initializer syntax stopped working. An
update to TypeScript? An update to Jest? Unknown, but sticking to the
less fancy constructor body to do property init seems to work.

Signed-off-by: Charles Lowell <cowboyd@frontside.com>
This commit is contained in:
Charles Lowell
2021-12-15 15:29:14 +02:00
parent baf39f45b5
commit c47959856a
@@ -72,15 +72,16 @@ function isBlank(str: string) {
* @public
*/
export class ElasticSearchSearchEngine implements SearchEngine {
private readonly elasticSearchClient: Client = this.newClient(
options => new Client(options),
);
private readonly elasticSearchClient: Client;
constructor(
private readonly elasticSearchClientOptions: ElasticSearchClientOptions,
private readonly aliasPostfix: string,
private readonly indexPrefix: string,
private readonly logger: Logger,
) {}
) {
this.elasticSearchClient = this.newClient(options => new Client(options));
}
static async fromConfig({
logger,