Skip to content

Commit

Permalink
Merge pull request #2552 from kuzzleio/fix/improve-types-for-build-er…
Browse files Browse the repository at this point in the history
…rors

fix: improve typing to avoid typescript build errors
  • Loading branch information
etrousset authored Oct 3, 2024
2 parents 92e0263 + 569bf2c commit cde355a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/kuzzle/kuzzle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -138,7 +138,7 @@ class Kuzzle extends KuzzleEventEmitter {
/**
* Validation core component
*/
public validation: Validation;
public validation: typeof Validation;

/**
* Dump generator
Expand All @@ -148,7 +148,7 @@ class Kuzzle extends KuzzleEventEmitter {
/**
* Vault component (will be initialized after bootstrap)
*/
public vault: vault;
public vault: typeof vault;

/**
* AsyncLocalStorage wrapper
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit cde355a

Please sign in to comment.