Extractor interface exported

Last updated: 2026-02-24T19:46:21.773Z

Metrics

LOC: 7 Complexity: 1 Params: 0

Signature

interface Extractor

Summary

Extractor Interface Base contract for extraction utilities that pull data from DOM / HTML elements. Extractors do NOT classify field types — they only gather raw data (labels, selectors, signals) from the page. TInput — what the extractor receives (e.g. HTMLElement, FormField). TResult — what the extractor returns (e.g. string, LabelResult). Concrete implementations: selectorExtractor : Extractor<Element, string> signalsExtractor : Extractor<Partial, string> labelExtractor : Extractor<HTMLElement, LabelResult | undefined>

Source Code

export interface Extractor<TInput, TResult> {
  /** Unique identifier for this extractor. */
  readonly name: string;

  /** Run the extraction logic and return the result. */
  extract(input: TInput): TResult;
}

Members

Name Kind Visibility Status Signature
extract method - extract(input: TInput): : TResult

No outgoing dependencies.

Impact (Incoming)

graph LR Extractor["Extractor"] findLabelWithStrategy["findLabelWithStrategy"] getUniqueSelector["getUniqueSelector"] buildSignals["buildSignals"] findLabelWithStrategy -->|uses| Extractor getUniqueSelector -->|uses| Extractor buildSignals -->|uses| Extractor style Extractor fill:#dbeafe,stroke:#2563eb,stroke-width:2px click Extractor "5386f4a2b1ff68ed.html" click findLabelWithStrategy "8f614323e886c07b.html" click getUniqueSelector "7276f3807435c3b4.html" click buildSignals "fdbba0db0d498eca.html"