@alex.garcia/libfec / Unknown
Class: Unknown
Defined in: unknown.ts:31
A record with no typed class: a cover with no struct, a summary record (F3PS, …), or an itemization schedule not typed yet. Mirrors Python's libfec.Unknown.
It stands in for the typed object in Filing.cover and Filing.itemizations, so neither is ever null. type is "Unknown", so switch (item.type) narrows Itemization | Unknown:
for (const item of filing.itemizations()) {
switch (item.type) {
case "ScheduleA": console.log(item.contribution_amount); break;
case "Unknown": console.log(item.formType, item.record.values); break;
}
}Properties
type
readonlytype:"Unknown"
Defined in: unknown.ts:33
The discriminant: always "Unknown".
formType
readonlyformType:string
Defined in: unknown.ts:35
The row type as filed, e.g. "F3PS" (Record.rowType).
record
readonlyrecord:Record
Defined in: unknown.ts:37
The underlying raw record.
Methods
toJSON()
toJSON():
UnknownJSON
Defined in: unknown.ts:46
{ type, formType, values }: the record's values by column name, like Python's to_dict().