FieldClassifier interface exported
Last updated: 2026-03-01T23:35:47.796Z
Metrics
LOC: 8
Complexity: 1
Params: 0
Signature
interface FieldClassifier
Summary
FieldClassifier extends the base Detector contract. detect(field) attempts to classify the field and returns null (or a result with type "unknown") to pass control to the next classifier in the pipeline. Optionally, a classifier may implement detectAsync for strategies that require async I/O (e.g. Chrome Language AI). runAsync in DetectionPipeline will prefer detectAsync when present.
Source Code
export interface FieldClassifier extends Detector<
FormField,
ClassifierResult | null
> {
readonly name: DetectionMethod;
/** Optional async variant — used by DetectionPipeline.runAsync(). */
detectAsync?(field: FormField): Promise<ClassifierResult | null>;
}
Members
| Name | Kind | Visibility | Status | Signature |
|---|---|---|---|---|
| detectAsync | method | - | detectAsync(field: FormField): : Promise<ClassifierResult | null> |
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| FieldProcessingChain | uses |
| getActiveClassifiers | uses |
| createField | uses |
| makeField | uses |
| getContextHtml | uses |
| detect | uses |
| detect | uses |
| normalize | uses |
| PretrainedState | uses |