beancount
    Preparing search index...

    Function parseEntry

    • Parses a single unparsed entry into its corresponding Entry class instance.

      This function:

      • Performs generic parsing to determine entry type
      • Instantiates the appropriate Entry subclass
      • Handles special cases for comments and blank lines

      Parameters

      • unparsedEntry: string[]

        Array of string tokens representing a single entry

      • skipBlanklines: boolean = true

        If true, returns undefined for blank lines; if false, returns Blankline instances

      Returns
          | Transaction
          | Balance
          | Blankline
          | Close
          | Comment
          | Commodity
          | Custom
          | Document
          | Event
          | Include
          | Note
          | Open
          | Option
          | Pad
          | Plugin
          | Price
          | Poptag
          | Pushtag
          | Query
          | undefined

      An Entry instance, or undefined if the entry is blank and skipBlanklines is true