Skip to content

Commit

Permalink
updated some func signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
evbots committed Sep 11, 2020
1 parent 1a15837 commit cd922eb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/reportHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Map as IMap, List, fromJS, Collection } from 'immutable';
import { BigNumber } from 'bignumber.js';

import { TaxReport } from './types';
import { TaxReport, ImmutableMap } from './types';
import TaxLot from './taxLot';
import Disposal from './disposal';
import moment from 'moment';

export const applyUnmatchedSales = (report: TaxReport): IMap<any, any> => {
export const applyUnmatchedSales = (report: TaxReport): TaxReport => {
let currentReport = report;
report.reduce(
(
Expand Down Expand Up @@ -51,7 +51,13 @@ export const applyUnmatchedSales = (report: TaxReport): IMap<any, any> => {
return currentReport;
};

export const addIncomeToReport = (report: IMap<any, any>, taxLot: TaxLot): IMap<any, any> => {
export const addIncomeToReport = (
report: TaxReport,
taxLot: TaxLot
): ImmutableMap<{
report: TaxReport;
taxLot: TaxLot;
}> => {
let reportToUpdate = report;
if (taxLot.get('isIncome')) {
const incomeMoment = moment.utc(taxLot.unix, 'X');
Expand All @@ -75,10 +81,10 @@ export const addIncomeToReport = (report: IMap<any, any>, taxLot: TaxLot): IMap<
};

export const updateReportIncomeFromLots = (
report: IMap<any, any>,
report: TaxReport,
lots: IMap<string, List<TaxLot>>,
year: string
): IMap<any, any> => {
): TaxReport => {
const unixSOY = Number(
moment
.utc(year, 'YYYY')
Expand Down

0 comments on commit cd922eb

Please sign in to comment.