Remove dead code in app and XBRL loader
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
import type {
|
||||
FinancialStatementKind,
|
||||
FinancialUnit
|
||||
} from '@/lib/types';
|
||||
import {
|
||||
INCOME_SURFACES,
|
||||
BALANCE_SURFACES,
|
||||
CASH_FLOW_SURFACES
|
||||
} from '@/lib/generated';
|
||||
|
||||
export type CanonicalRowDefinition = {
|
||||
key: string;
|
||||
label: string;
|
||||
category: string;
|
||||
order: number;
|
||||
unit: FinancialUnit;
|
||||
};
|
||||
|
||||
function toCanonicalRow(surface: { surface_key: string; label: string; category: string; order: number; unit: string }) {
|
||||
return {
|
||||
key: surface.surface_key,
|
||||
label: surface.label,
|
||||
category: surface.category,
|
||||
order: surface.order,
|
||||
unit: surface.unit as FinancialUnit
|
||||
};
|
||||
}
|
||||
|
||||
export const CANONICAL_ROW_DEFINITIONS: Record<Extract<FinancialStatementKind, 'income' | 'balance' | 'cash_flow'>, CanonicalRowDefinition[]> = {
|
||||
income: INCOME_SURFACES.map(toCanonicalRow),
|
||||
balance: BALANCE_SURFACES.map(toCanonicalRow),
|
||||
cash_flow: CASH_FLOW_SURFACES.map(toCanonicalRow)
|
||||
};
|
||||
Reference in New Issue
Block a user