inferCategoryFromType function exported ✓ 100.0%
Last updated: 2026-02-24T21:07:57.585Z
Metrics
LOC: 9
Complexity: 3
Params: 1
Coverage: 100.0% (3/3 lines, 3x executed)
Signature
inferCategoryFromType(type: FieldType): : FieldCategory
Summary
Maps a {@link FieldType} to its canonical {@link FieldCategory}.
Source Code
export function inferCategoryFromType(type: FieldType): FieldCategory {
for (const [category, types] of Object.entries(
FIELD_TYPES_BY_CATEGORY,
) as Array<[FieldCategory, FieldType[]]>) {
if (types.includes(type)) return category;
}
return "unknown";
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| TrainingProgress | uses |
| PretrainedState | uses |