fix: corrigir tipos e eliminar non-null assertions
Substitui non-null assertions (!) por type assertions ou optional chaining com guards. Troca any por unknown/tipos explícitos. - drizzle.config: DATABASE_URL! → as string - use-form-state: Record<string, any> → Record<string, unknown> - actions: catch (e: any) → catch (e), model tipado explicitamente - pagadores/data: row: any → Record<string, unknown> - note-dialog: result tipado explicitamente - bulk-import: payload as any removido - Map.get()! → optional chaining + guards em relatórios e dashboard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,7 +98,8 @@ export async function fetchCategoryReport(
|
||||
});
|
||||
}
|
||||
|
||||
const categoryItem = categoryMap.get(categoryId)!;
|
||||
const categoryItem = categoryMap.get(categoryId);
|
||||
if (!categoryItem) continue;
|
||||
|
||||
// Add monthly data (will calculate percentage later)
|
||||
categoryItem.monthlyData.set(period, {
|
||||
@@ -122,7 +123,8 @@ export async function fetchCategoryReport(
|
||||
|
||||
for (let i = 0; i < sortedPeriods.length; i++) {
|
||||
const period = sortedPeriods[i];
|
||||
const monthlyData = categoryItem.monthlyData.get(period)!;
|
||||
const monthlyData = categoryItem.monthlyData.get(period);
|
||||
if (!monthlyData) continue;
|
||||
|
||||
if (i > 0) {
|
||||
// Get previous period data
|
||||
|
||||
Reference in New Issue
Block a user