From a53622a3aff1eb970297588bd869f1110fc18fc8 Mon Sep 17 00:00:00 2001 From: Alex Kanunnikov Date: Tue, 9 Jul 2024 11:17:38 +0300 Subject: [PATCH] + --- src/index.ts | 8 ++++---- src/transaction.ts | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 5fb20c9..1b1f636 100644 --- a/src/index.ts +++ b/src/index.ts @@ -61,13 +61,13 @@ export function signal( ) { if (args[1].kind === "accessor") { return stateDecorator( - ...(args as Parameters>) + ...(args as Parameters>), ); } if (args[1].kind === "getter") { return computedDecorator( - ...(args as Parameters>) + ...(args as Parameters>), ); } @@ -76,7 +76,7 @@ export function signal( function stateDecorator( target: ClassAccessorDecoratorTarget, - context: ClassAccessorDecoratorContext + context: ClassAccessorDecoratorContext, ): ClassAccessorDecoratorResult { const { get } = target; @@ -109,7 +109,7 @@ function stateDecorator( function computedDecorator( target: () => Value, - context: ClassGetterDecoratorContext + context: ClassGetterDecoratorContext, ): () => Value { const kind = context.kind; diff --git a/src/transaction.ts b/src/transaction.ts index a4db407..e656a98 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -16,7 +16,7 @@ export function pushActiveTransaction(transaction: Transaction): void { export function signalTransactionSetter( signal: Signal.State, - value: any + value: any, ): void { if (activeTransaction) { const { cellState, usedCells, seenCells } = activeTransaction; @@ -72,7 +72,8 @@ export class Transaction { this.execute(fn); } this.ensureSafeToCommit(); - const parentTransaction = activeTransactions[activeTransactions.length - 1] || null; + const parentTransaction = + activeTransactions[activeTransactions.length - 1] || null; if (parentTransaction) { const { usedCells, cellState } = parentTransaction; this.usedCells.forEach((signal) => {