Skip to content

Commit

Permalink
fix(mixins): exports path
Browse files Browse the repository at this point in the history
  • Loading branch information
MM25Zamanian committed Mar 6, 2024
1 parent 82addf0 commit 461bd92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions packages/mixins/src/lib/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export declare class LoggerMixinInterface extends LitElement {
}

export function LoggerMixin<T extends Constructor<LitElement>>(
superClass: T
superClass: T
): Constructor<LoggerMixinInterface> & T {
class LoggerMixinClass extends superClass {
protected log = new GecutLogger(`<${this.tagName.toLowerCase()}>`);
Expand Down Expand Up @@ -40,9 +40,9 @@ export function LoggerMixin<T extends Constructor<LitElement>>(
}

override requestUpdate(
name?: PropertyKey | undefined,
oldValue?: unknown,
options?: PropertyDeclaration<unknown, unknown> | undefined
name?: PropertyKey | undefined,
oldValue?: unknown,
options?: PropertyDeclaration<unknown, unknown> | undefined
): void {
this?.log?.methodArgs?.('requestUpdate', {
name,
Expand Down Expand Up @@ -73,7 +73,8 @@ export function LoggerMixin<T extends Constructor<LitElement>>(

if (this._$firstUpdated) {
this.log.timeEnd?.('update-time');
} else {
}
else {
this._$firstUpdated = true;
}

Expand All @@ -87,5 +88,5 @@ export function LoggerMixin<T extends Constructor<LitElement>>(
}

return LoggerMixinClass as unknown as Constructor<LoggerMixinInterface> &
T;
T;
}
6 changes: 3 additions & 3 deletions packages/mixins/src/lib/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export declare class SignalMixinInterface extends LitElement {
export type MixinReturn<T> = Constructor<SignalMixinInterface> & T;

export function SignalMixin<T extends Constructor<LitElement>>(
superClass: T
superClass: T
): MixinReturn<T> {
class SignalMixinClass extends superClass {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -28,8 +28,8 @@ export function SignalMixin<T extends Constructor<LitElement>>(
}

protected addSignalSubscriber<T, S extends Signal<T>>(
signal: S,
subscriber: Subscriber<T>
signal: S,
subscriber: Subscriber<T>
): void {
this.signalSubscribers.push([signal, subscriber]);
}
Expand Down

0 comments on commit 461bd92

Please sign in to comment.