Skip to content

Commit

Permalink
fix(element): logger mixin issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Feb 7, 2023
1 parent f1d0968 commit db5d96d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ui/element/src/mixins/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ export declare class LoggerMixinInterface extends LitElement {

export function LoggerMixin<T extends Constructor<LitElement>>(superClass: T): Constructor<LoggerMixinInterface> & T {
class LoggerMixinClass extends superClass {
ali: number;
protected _logger;
ali: number = ++_lastAli;
protected _logger = createLogger(`<${this.tagName.toLowerCase()}-${this.ali}>`);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(...args: any[]) {
super(...args);
this.ali = ++_lastAli;
this._logger = createLogger(`<${this.tagName.toLowerCase()}-${this.ali}>`);
this._logger.logMethod('constructor');
}

Expand Down

0 comments on commit db5d96d

Please sign in to comment.