mirror of
https://github.com/acedanger/finance.git
synced 2025-12-06 07:00:13 -08:00
Refactor index.astro to improve type safety, enhance UI update functions, and streamline event handling for transactions
This commit is contained in:
13
src/types/events.ts
Normal file
13
src/types/events.ts
Normal 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>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user