getFieldTypeOptions function exported ✓ 100.0%
Last updated: 2026-03-01T23:25:47.131Z
Metrics
LOC: 7
Complexity: 1
Params: 2
Coverage: 100.0% (3/3 lines, 2x executed)
Signature
getFieldTypeOptions(
types: readonly FieldType[] = FIELD_TYPES,
): : FieldTypeOption[]
Summary
Builds a sorted list of { value, label } options from the given field types. Defaults to all known FIELD_TYPES when none are provided.
Source Code
export function getFieldTypeOptions(
types: readonly FieldType[] = FIELD_TYPES,
): FieldTypeOption[] {
return [...types]
.map((type) => ({ value: type, label: getFieldTypeLabel(type) }))
.sort((a, b) => a.label.localeCompare(b.label, "pt-BR"));
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| getFieldTypeLabel | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| handleRuleButtonClick | uses |