Fix TypeScript and Sync Errors
- Resolves TypeScript errors related to missing exports and incorrect argument counts. - Corrects re-exporting of types to comply with `isolatedModules` setting. - Addresses issues in sync-related files to ensure proper functionality.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import { uploadBudgets, downloadBudgets } from './budget';
|
||||
import { uploadTransactions, downloadTransactions } from './transaction';
|
||||
@@ -17,9 +16,7 @@ export interface SyncResult {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 모든 데이터를 동기화합니다 (업로드 우선 수행)
|
||||
*/
|
||||
// 모든 데이터를 동기화합니다 (업로드 우선 수행)
|
||||
export const syncAllData = async (userId: string): Promise<SyncResult> => {
|
||||
// 로컬 데이터 백업
|
||||
const backupBudgetData = localStorage.getItem('budgetData');
|
||||
@@ -160,10 +157,7 @@ export const syncAllData = async (userId: string): Promise<SyncResult> => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 서버에 대한 안전한 동기화 래퍼
|
||||
* 오류 처리와 재시도 로직을 포함
|
||||
*/
|
||||
// 서버에 대한 안전한 동기화 래퍼 - 인자 수정
|
||||
export const trySyncAllData = async (userId: string): Promise<SyncResult> => {
|
||||
console.log('안전한 데이터 동기화 시도');
|
||||
let attempts = 0;
|
||||
|
||||
Reference in New Issue
Block a user