From 569bf2c680e70c47cb5b8f81a326f4039e8a5214 Mon Sep 17 00:00:00 2001 From: Juiced66 Date: Thu, 3 Oct 2024 07:26:48 +0200 Subject: [PATCH] fix: improve typing to avoid typescript build errors --- lib/kuzzle/kuzzle.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/kuzzle/kuzzle.ts b/lib/kuzzle/kuzzle.ts index 218b1b6e36..683c1701ae 100644 --- a/lib/kuzzle/kuzzle.ts +++ b/lib/kuzzle/kuzzle.ts @@ -103,7 +103,7 @@ type ImportStatus = { class Kuzzle extends KuzzleEventEmitter { public config: KuzzleConfiguration; - private _state: kuzzleStateEnum = kuzzleStateEnum.STARTING; + private _state: typeof kuzzleStateEnum = kuzzleStateEnum.STARTING; public log: Logger; private rootPath: string; /** @@ -138,7 +138,7 @@ class Kuzzle extends KuzzleEventEmitter { /** * Validation core component */ - public validation: Validation; + public validation: typeof Validation; /** * Dump generator @@ -148,7 +148,7 @@ class Kuzzle extends KuzzleEventEmitter { /** * Vault component (will be initialized after bootstrap) */ - public vault: vault; + public vault: typeof vault; /** * AsyncLocalStorage wrapper @@ -833,11 +833,11 @@ class Kuzzle extends KuzzleEventEmitter { ); } - get state() { + get state(): typeof kuzzleStateEnum { return this._state; } - set state(value) { + set state(value: typeof kuzzleStateEnum) { this._state = value; this.emit("kuzzle:state:change", value); }