Constructor
new FileDescriptor(details, headeropt, footeropt)
Creates an instance of FileDescriptor.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
details |
Array.<DetailRowDescriptor> | Array of detail row descriptors. | ||
header |
HeaderRowDescriptor | null |
<optional> |
null | Optional header row descriptor. |
footer |
FooterRowDescriptor | null |
<optional> |
null | Optional footer row descriptor. |
- Source:
Throws:
-
-
If details is not an Array or elements are not DetailRowDescriptor.
- Type
- TypeError
-
-
-
If details array is empty or row line sizes do not match.
- Type
- Error
-
Example
const detail = new DetailRowDescriptor([new CharColumn('name', 20)]);
const fileDesc = new FileDescriptor([detail]);
Classes
Members
details :Array.<DetailRowDescriptor>
Array of detail row descriptors.
Type:
- Array.<DetailRowDescriptor>
- Source:
footer :FooterRowDescriptor|null
Optional footer row descriptor.
Type:
- FooterRowDescriptor | null
- Source:
header :HeaderRowDescriptor|null
Optional header row descriptor.
Type:
- HeaderRowDescriptor | null
- Source:
lineSize :number
Expected total line size width in characters across all row descriptors.
Type:
- number
- Source:
Methods
validateLineSizes()
Validates that all row descriptors (details, header, and footer) have matching line sizes.
- Source:
Throws:
-
If line sizes differ across row descriptors.
- Type
- Error