UNPKG

@cranberry-money/shared-utils

Version:

Shared utility functions for Blueberry platform

24 lines 1.03 kB
import type { AssetAllocation, AssetHolding } from '@cranberry-money/shared-types'; export interface AllocationDisplayItem { readonly instrumentUuid: string; readonly symbol: string; readonly name: string; readonly targetPercentage?: number; readonly actualPercentage?: number; readonly quantity?: number; readonly value?: number; readonly currentPrice?: number; readonly color: string; readonly hasTarget: boolean; readonly hasActual: boolean; } export declare const processAllocationData: (allocations: readonly AssetAllocation[], holdings: readonly AssetHolding[]) => AllocationDisplayItem[]; export declare const calculateTotals: (items: readonly AllocationDisplayItem[]) => { totalTarget: number; totalActual: number; totalValue: number; totalQuantity: number; }; export declare const formatPercentage: (value?: number) => string; export declare const formatDashboardCurrency: (value?: number, currency?: string) => string; //# sourceMappingURL=dashboard.d.ts.map