createClassifier function test
Last updated: 2026-03-01T23:25:47.105Z
Metrics
LOC: 17
Complexity: 4
Params: 3
Signature
createClassifier(
name: FieldClassifier["name"],
result: Partial<{
type: FormField["fieldType"];
confidence: number;
method: FormField["detectionMethod"];
}>,
): : FieldClassifier
Source Code
function createClassifier(
name: FieldClassifier["name"],
result: Partial<{
type: FormField["fieldType"];
confidence: number;
method: FormField["detectionMethod"];
}>,
): FieldClassifier {
return {
name,
detect: () => ({
type: result.type ?? "unknown",
confidence: result.confidence ?? 0,
method: result.method ?? "html-fallback",
}),
};
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| createField | calls |