Refactor index.astro to improve type safety, enhance UI update functions, and streamline event handling for transactions

This commit is contained in:
GitHub Copilot
2025-04-24 08:37:33 -04:00
parent b76a24edba
commit bb6bd75434
2 changed files with 57 additions and 38 deletions

13
src/types/events.ts Normal file
View File

@@ -0,0 +1,13 @@
import type { Transaction } from "../types";
export interface TransactionEventDetail {
transaction: Transaction;
}
declare global {
interface WindowEventMap {
transactionCreated: CustomEvent<TransactionEventDetail>;
transactionUpdated: CustomEvent<TransactionEventDetail>;
editTransaction: CustomEvent<TransactionEventDetail>;
}
}