stream method ✓ 100.0%

Last updated: 2026-03-01T23:25:47.106Z

Metrics

LOC: 7 Complexity: 2 Params: 1 Coverage: 100.0% (4/4 lines, 3x executed)

Signature

stream(fields: FormField[]): : AsyncGenerator<FormField>

Summary

Streaming run — yields each FormField immediately after it is classified. Enables real-time UI updates while classification is still in progress.

Source Code

  async *stream(fields: FormField[]): AsyncGenerator<FormField> {
    const pipeline = new DetectionPipeline(this._classifiers);
    for (const field of fields) {
      this.applyResult(field, await pipeline.runAsync(field));
      yield field;
    }
  }

Dependencies (Outgoing)

graph LR stream["stream"] DetectionPipeline["DetectionPipeline"] stream -.->|instantiates| DetectionPipeline style stream fill:#dbeafe,stroke:#2563eb,stroke-width:2px click stream "201dc8fac84b81eb.html" click DetectionPipeline "c51ffbb1759babe9.html"
TargetType
DetectionPipeline instantiates

No incoming dependencies.