Type Alias TabularField
TabularField: {
header: string;
optional?: boolean;
type?: "string" | "number" | "boolean";
} & (
| {
allowedValues?: readonly string[];
maxLength?: number;
type?: "string"
| never;
}
| { allowedValues?: readonly number[]; type: "number" }
| { type: "boolean" }
)
header: string;
optional?: boolean;
type?: "string" | "number" | "boolean";
} & (
| {
allowedValues?: readonly string[];
maxLength?: number;
type?: "string"
| never;
}
| { allowedValues?: readonly number[]; type: "number" }
| { type: "boolean" }
)
Type Declaration
header: string
Header we expect this field to have
Optionaloptional?: booleanSet if this field doesn't need to appear as on of the columns in the import
Optionaltype?: "string" | "number" | "boolean"Expected data type. Defaults to string
- {
allowedValues?: readonly string[];
maxLength?: number;
type?: "string" | never;
}OptionalallowedValues?: readonly string[]Limit allowed values for the field. Pass these 'as const' to reflect these limited values in the output type
OptionalmaxLength?: numberMaximum length for string fields
Optionaltype?: "string" | never
- { allowedValues?: readonly number[]; type: "number" }
OptionalallowedValues?: readonly number[]Limit allowed values for the field. Pass these 'as const' to reflect these limited values in the output type
type: "number"
- { type: "boolean" }
Configuration for a single output property.
header: expected column header text (case-insensitive exact match).optional: when true the column may be absent; otherwise a missing column produces a "missing-column" error.type: one of "string", "number" or "boolean". Defaults to "string" when omitted.For string fields you may provide
maxLengthandallowedValues(useas constto narrow TypeScript types). For number fields you may provideallowedValues(useas const).