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)

graph LR getFieldTypeOptions["getFieldTypeOptions"] getFieldTypeLabel["getFieldTypeLabel"] getFieldTypeOptions -->|calls| getFieldTypeLabel style getFieldTypeOptions fill:#dbeafe,stroke:#2563eb,stroke-width:2px click getFieldTypeOptions "d108aaeac92c9305.html" click getFieldTypeLabel "554362aa9aa64584.html"
TargetType
getFieldTypeLabel calls

Impact (Incoming)

graph LR getFieldTypeOptions["getFieldTypeOptions"] handleRuleButtonClick["handleRuleButtonClick"] handleRuleButtonClick -->|uses| getFieldTypeOptions style getFieldTypeOptions fill:#dbeafe,stroke:#2563eb,stroke-width:2px click getFieldTypeOptions "d108aaeac92c9305.html" click handleRuleButtonClick "302ac6e6209ebb8e.html"
SourceType
handleRuleButtonClick uses