Options
All
  • Public
  • Public/Protected
  • All
Menu

Input processing, invoked by loadData. A separate file because loadData triggers loading problems for jest unit tests.

Index

Type aliases

Converters

Converters: {[ T in RowLabel]: (a: any) => AnyRow[T] } & { src: any; temporal: any }

Variables

Let END

END: Date = ...

The default end date.

Let START

START: Date = ...

The default start date is the start of the next month.

Const converters

converters: Converters = ...

Map of fields to converters to convert to the proper type (e.g. number, date, etc.)

Functions

Const convert

  • Conveert an InputRow to an AnyRow, that is, parse and validate fields for each type of object.

    InputRow objects differ from AnyRow objects, in that the field names are capitalized. This is convenient for column headings in editing the CSV files, and also helps to distinguish between unprocessed InputRow and processed AnyRow objects.

    Type parameters

    • T: "incomeStream" | "person" | "scenario" | "asset" | "liability" | "income" | "expense" | "incomeTax" | "text"

    Parameters

    Returns AnyRow

Const optional

  • optional<T>(fn: (a: any) => T): <D>(dflt: D) => (a: any) => T | D
  • Type parameters

    • T

    Parameters

    • fn: (a: any) => T
        • (a: any): T
        • Parameters

          • a: any

          Returns T

    Returns <D>(dflt: D) => (a: any) => T | D

      • <D>(dflt: D): (a: any) => T | D
      • Type parameters

        • D

        Parameters

        • dflt: D

        Returns (a: any) => T | D

          • (a: any): T | D
          • Parameters

            • a: any

            Returns T | D

Const optionalDate

  • optionalDate<D>(dflt: D): (a: any) => Date | D
  • Type parameters

    • D

    Parameters

    • dflt: D

    Returns (a: any) => Date | D

      • (a: any): Date | D
      • Parameters

        • a: any

        Returns Date | D

Const optionalMoney

  • optionalMoney<D>(dflt: D): (a: any) => Tagged<"Money", number> | D
  • Type parameters

    • D

    Parameters

    • dflt: D

    Returns (a: any) => Tagged<"Money", number> | D

      • (a: any): Tagged<"Money", number> | D
      • Parameters

        • a: any

        Returns Tagged<"Money", number> | D

Const optionalNumber

  • optionalNumber<D>(dflt: D): (a: any) => number | D
  • Type parameters

    • D

    Parameters

    • dflt: D

    Returns (a: any) => number | D

      • (a: any): number | D
      • Parameters

        • a: any

        Returns number | D

Const optionalRate

  • optionalRate<D>(dflt: D): (a: any) => Tagged<"Rate", number> | D
  • Type parameters

    • D

    Parameters

    • dflt: D

    Returns (a: any) => Tagged<"Rate", number> | D

      • (a: any): Tagged<"Rate", number> | D
      • Parameters

        • a: any

        Returns Tagged<"Rate", number> | D

Const or

  • or<T>(dflt: T): (a: any) => T
  • Type parameters

    • T

    Parameters

    • dflt: T

    Returns (a: any) => T

      • (a: any): T
      • Parameters

        • a: any

        Returns T

Const split

  • split<T>(dflt: T[]): (c: any) => T[]
  • Type parameters

    • T

    Parameters

    • dflt: T[]

    Returns (c: any) => T[]

      • (c: any): T[]
      • Parameters

        • c: any

        Returns T[]

Generated using TypeDoc